diff options
author | oga | 2008-05-23 18:48:57 +0000 |
---|---|---|
committer | oga | 2008-05-23 18:48:57 +0000 |
commit | 15ebf6bebd521e4e1fcb64959ea5a6180b9b951c (patch) | |
tree | 70b5c300dac7050accc62a2692ed5adf26d7aec1 /menu.c | |
parent | 70508fca2af57f5b3b025a45f7b5a6a66e31d4cb (diff) | |
download | cwm-15ebf6bebd521e4e1fcb64959ea5a6180b9b951c.tar.gz |
Grab the keyboard when we initialise the menu. This stops the keyboard
shortcut code stealing our events in some cases.
"put 'er in" okan@.
Diffstat (limited to '')
-rw-r--r-- | menu.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -118,6 +118,10 @@ menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy, XGetInputFocus(X_Dpy, &focuswin, &focusrevert); XSetInputFocus(X_Dpy, sc->menuwin, RevertToPointerRoot, CurrentTime); + /* make sure keybindings don't remove keys from the menu stream */ + XGrabKeyboard(X_Dpy, sc->menuwin, True, + GrabModeAsync, GrabModeAsync, CurrentTime); + for (;;) { mc.changed = 0; @@ -153,6 +157,7 @@ out: } XUnmapWindow(X_Dpy, sc->menuwin); + XUngrabKeyboard(X_Dpy, CurrentTime); return (mi); } |