mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
be explicit in which key masks we allow during keypress and buttonpress
events; from Alexander Polakov - makes non-us layout reliable.
This commit is contained in:
parent
3a45879d76
commit
637edf38d5
@ -240,8 +240,8 @@ xev_handle_buttonpress(XEvent *ee)
|
|||||||
sc = screen_fromroot(e->root);
|
sc = screen_fromroot(e->root);
|
||||||
cc = client_find(e->window);
|
cc = client_find(e->window);
|
||||||
|
|
||||||
/* Ignore caps lock and numlock */
|
/* only allow the ones we care about */
|
||||||
e->state &= ~(Mod2Mask | LockMask);
|
e->state &= (ControlMask | Mod1Mask | Mod4Mask | ShiftMask);
|
||||||
|
|
||||||
TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
|
TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
|
||||||
if (e->button == mb->button && e->state == mb->modmask)
|
if (e->button == mb->button && e->state == mb->modmask)
|
||||||
@ -282,8 +282,8 @@ xev_handle_keypress(XEvent *ee)
|
|||||||
keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
|
keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
|
||||||
skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1);
|
skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1);
|
||||||
|
|
||||||
/* we don't care about caps lock and numlock here */
|
/* only allow the ones we care about */
|
||||||
e->state &= ~(LockMask | Mod2Mask);
|
e->state &= (ControlMask | Mod1Mask | Mod4Mask | ShiftMask);
|
||||||
|
|
||||||
TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
|
TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
|
||||||
if (keysym != kb->keysym && skeysym == kb->keysym)
|
if (keysym != kb->keysym && skeysym == kb->keysym)
|
||||||
|
Loading…
Reference in New Issue
Block a user