summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2011-02-19 01:48:43 +0100
committerMichael Cardell Widerkrantz <mc@hack.org>2011-02-19 01:48:43 +0100
commit68c1e9e6fcdbf71270eb9612650b4100f940f87d (patch)
treef844ac9fad2bf210a0cb215d5bae2eb5f9e894cb
parent48e53c7b77ed55003ab5ef15da254da5e4c30fcb (diff)
downloadmcwm-68c1e9e6fcdbf71270eb9612650b4100f940f87d.zip
Specifically grab the keycodes we bind.
-rw-r--r--mcwm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mcwm.c b/mcwm.c
index 98cf1bd..6b94d21 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -1019,7 +1019,11 @@ int setupkeys(void)
return -1;
}
- }
+
+ /* Grab this key. */
+ xcb_grab_key(conn, 1, screen->root, MODKEY, keys[i].keycode,
+ XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
+ } /* for */
/* Get rid of the key symbols table. */
free(keysyms);
@@ -3102,10 +3106,7 @@ int main(int argc, char **argv)
exit(1);
}
- /* Grab some keys and mouse buttons. */
-
- xcb_grab_key(conn, 1, root, MODKEY, XCB_NO_SYMBOL,
- XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
+ /* Grab mouse buttons. */
xcb_grab_button(conn, 0, root, XCB_EVENT_MASK_BUTTON_PRESS
| XCB_EVENT_MASK_BUTTON_RELEASE,