diff options
author | okan <okan> | 2013-10-20 01:55:32 +0000 |
---|---|---|
committer | okan <okan> | 2013-10-20 01:55:32 +0000 |
commit | 5b733a152daa01493301333a7e756394f9b45455 (patch) | |
tree | 7e093b57125d105e6c2a2995cba0d6cb3758caa0 | |
parent | 9ff288baefadb19f50def66072d1a9a765efe5b5 (diff) | |
download | cwm-5b733a152daa01493301333a7e756394f9b45455.tar.gz cwm-5b733a152daa01493301333a7e756394f9b45455.tar.xz cwm-5b733a152daa01493301333a7e756394f9b45455.zip |
wrap key ungrab like btn ungrab, for it'll be used again
-rw-r--r-- | calmwm.h | 1 | ||||
-rw-r--r-- | conf.c | 2 | ||||
-rw-r--r-- | xutil.c | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/calmwm.h b/calmwm.h index e888bac..5a827b4 100644 --- a/calmwm.h +++ b/calmwm.h @@ -516,6 +516,7 @@ int xu_getprop(Window, Atom, Atom, long, unsigned char **); int xu_get_wm_state(Window, int *); int xu_getstrprop(Window, Atom, char **); void xu_key_grab(Window, u_int, KeySym); +void xu_key_ungrab(Window); void xu_ptr_getpos(Window, int *, int *); int xu_ptr_grab(Window, u_int, Cursor); int xu_ptr_regrab(u_int, Cursor); diff --git a/conf.c b/conf.c index ce3ee1e..68a5351 100644 --- a/conf.c +++ b/conf.c @@ -663,7 +663,7 @@ conf_grab_kbd(Window win) { struct keybinding *kb; - XUngrabKey(X_Dpy, AnyKey, AnyModifier, win); + xu_key_ungrab(win); TAILQ_FOREACH(kb, &Conf.keybindingq, entry) xu_key_grab(win, kb->modmask, kb->keysym); diff --git a/xutil.c b/xutil.c index f33fa9a..30a89f8 100644 --- a/xutil.c +++ b/xutil.c @@ -102,6 +102,12 @@ xu_key_grab(Window win, u_int mask, KeySym keysym) True, GrabModeAsync, GrabModeAsync); } +void +xu_key_ungrab(Window win) +{ + XUngrabKey(X_Dpy, AnyKey, AnyModifier, win); +} + int xu_getprop(Window win, Atom atm, Atom type, long len, unsigned char **p) { |