mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
alter conf_grab(_kbd) to first ungrab AnyKey/AnyModifier, then proceed
to grab keys in keybindingq. we don't need to ungrab/grab on every addition to the queue, just once with a complete keybindingq; simplify grabbing keys per screen (during init) and during a MappingNotify. while here, change conf_grab_{kbd,mouse} to require only a Window.
This commit is contained in:
15
xutil.c
15
xutil.c
@@ -105,21 +105,6 @@ xu_key_grab(Window win, u_int mask, KeySym keysym)
|
||||
True, GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
|
||||
void
|
||||
xu_key_ungrab(Window win, u_int mask, KeySym keysym)
|
||||
{
|
||||
KeyCode code;
|
||||
u_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++)
|
||||
XUngrabKey(X_Dpy, code, (mask | ign_mods[i]), win);
|
||||
}
|
||||
|
||||
void
|
||||
xu_configure(struct client_ctx *cc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user