Fix keygrabs handling (e.g. focus list staying up).

SVN revision: 13905
This commit is contained in:
Kim Woelders 2005-03-25 18:11:53 +00:00
parent f2a992e59a
commit ac2b7f5307
4 changed files with 6 additions and 5 deletions

View File

@ -1389,7 +1389,7 @@ GrabActionKey(Action * aa)
{
mod = AnyModifier;
XGrabKey(disp, aa->key, mod, VRoot.win, False, GrabModeAsync,
GrabModeAsync);
GrabModeSync);
}
else
{
@ -1398,7 +1398,7 @@ GrabActionKey(Action * aa)
/* grab the key even if locks are on or not */
for (i = 0; i < 8; i++)
XGrabKey(disp, aa->key, mod | Mode.masks.mod_combos[i], VRoot.win,
False, GrabModeAsync, GrabModeAsync);
False, GrabModeAsync, GrabModeSync);
}
}

View File

@ -25,7 +25,7 @@
#include <time.h>
#define EDESK_EVENT_MASK \
(KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \
(ButtonPressMask | ButtonReleaseMask | \
EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonMotionMask | \
SubstructureNotifyMask | SubstructureRedirectMask | PropertyChangeMask)

View File

@ -236,6 +236,8 @@ HandleEvent(XEvent * ev)
case KeyPress: /* 2 */
case KeyRelease: /* 3 */
ModeGetXY(ev->xbutton.root, ev->xkey.x_root, ev->xkey.y_root);
/* Unfreeze keyboard in case we got here by keygrab */
XAllowEvents(disp, AsyncKeyboard, CurrentTime);
break;
case ButtonPress: /* 4 */
SoundPlay("SOUND_BUTTON_CLICK");

View File

@ -284,8 +284,7 @@ SetupX(const char *dstr)
mask =
ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask |
ButtonMotionMask | PropertyChangeMask | SubstructureRedirectMask |
KeyPressMask | KeyReleaseMask | PointerMotionMask |
SubstructureNotifyMask;
PointerMotionMask | SubstructureNotifyMask;
if (Mode.wm.window)
mask |= StructureNotifyMask;
XSelectInput(disp, VRoot.win, mask);