aboutsummaryrefslogtreecommitdiffstats
path: root/xutil.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--xutil.c64
1 files changed, 1 insertions, 63 deletions
diff --git a/xutil.c b/xutil.c
index 3e7e99e..f2691ff 100644
--- a/xutil.c
+++ b/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.105 2016/09/28 17:06:33 okan Exp $
+ * $OpenBSD: xutil.c,v 1.106 2016/09/30 18:28:06 okan Exp $
*/
#include <sys/types.h>
@@ -31,68 +31,6 @@
#include "calmwm.h"
-static unsigned int ign_mods[] = { 0, LockMask, Mod2Mask, Mod2Mask | LockMask };
-
-void
-xu_btn_grab(Window win, int mask, unsigned int btn)
-{
- unsigned int i;
-
- for (i = 0; i < nitems(ign_mods); i++)
- XGrabButton(X_Dpy, btn, (mask | ign_mods[i]), win,
- False, BUTTONMASK, GrabModeAsync,
- GrabModeSync, None, None);
-}
-
-void
-xu_btn_ungrab(Window win)
-{
- XUngrabButton(X_Dpy, AnyButton, AnyModifier, win);
-}
-
-void
-xu_key_grab(Window win, unsigned int mask, KeySym keysym)
-{
- KeyCode code;
- unsigned int i;
-
- code = XKeysymToKeycode(X_Dpy, keysym);
- if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) &&
- (XkbKeycodeToKeysym(X_Dpy, code, 0, 1) == keysym))
- mask |= ShiftMask;
-
- for (i = 0; i < nitems(ign_mods); i++)
- XGrabKey(X_Dpy, code, (mask | ign_mods[i]), win,
- True, GrabModeAsync, GrabModeAsync);
-}
-
-void
-xu_key_ungrab(Window win)
-{
- XUngrabKey(X_Dpy, AnyKey, AnyModifier, win);
-}
-
-int
-xu_ptr_grab(Window win, unsigned int mask, Cursor curs)
-{
- return(XGrabPointer(X_Dpy, win, False, mask,
- GrabModeAsync, GrabModeAsync,
- None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
-}
-
-int
-xu_ptr_regrab(unsigned int mask, Cursor curs)
-{
- return(XChangeActivePointerGrab(X_Dpy, mask,
- curs, CurrentTime) == GrabSuccess ? 0 : -1);
-}
-
-void
-xu_ptr_ungrab(void)
-{
- XUngrabPointer(X_Dpy, CurrentTime);
-}
-
void
xu_ptr_getpos(Window win, int *x, int *y)
{