diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2012-09-10 13:28:05 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2012-09-10 13:28:05 +0000 |
commit | 286f64d00e2fc6fdf1055d3c388b33035419c12c (patch) | |
tree | 8679fa66a131c40a88e0a53339f5596d280c8b9f /app | |
parent | a6848ec52a6b0fc3b3f55dee0d0235960030bf4a (diff) |
be explicit in which key masks we allow during keypress and buttonpress
events; from Alexander Polakov - makes non-us layout reliable.
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/xevents.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c index 6d98e7191..b20adbc5c 100644 --- a/app/cwm/xevents.c +++ b/app/cwm/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xevents.c,v 1.65 2012/07/13 17:01:04 okan Exp $ + * $OpenBSD: xevents.c,v 1.66 2012/09/10 13:28:04 okan Exp $ */ /* @@ -240,8 +240,8 @@ xev_handle_buttonpress(XEvent *ee) sc = screen_fromroot(e->root); cc = client_find(e->window); - /* Ignore caps lock and numlock */ - e->state &= ~(Mod2Mask | LockMask); + /* only allow the ones we care about */ + e->state &= (ControlMask | Mod1Mask | Mod4Mask | ShiftMask); TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) { 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); skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1); - /* we don't care about caps lock and numlock here */ - e->state &= ~(LockMask | Mod2Mask); + /* only allow the ones we care about */ + e->state &= (ControlMask | Mod1Mask | Mod4Mask | ShiftMask); TAILQ_FOREACH(kb, &Conf.keybindingq, entry) { if (keysym != kb->keysym && skeysym == kb->keysym) |