[yocto] [matchbox-wm][PATCH 1/2] wm: disregard Caps/Num/Scroll-lock when handling keypresses
Jussi Kukkonen
jussi.kukkonen at intel.com
Tue Apr 12 04:43:39 PDT 2016
<alt>-Tab and other keybindings should work even when the various
locks are on.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
---
src/wm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/wm.c b/src/wm.c
index 2d05ff0..00d88c5 100644
--- a/src/wm.c
+++ b/src/wm.c
@@ -1074,6 +1074,7 @@ wm_handle_keypress(Wm *w, XKeyEvent *e)
#ifndef NO_KBD
MBConfigKbdEntry *entry = w->config->kb->entrys;
Client *p = NULL;
+ int state = e->state;
#ifdef USE_LIBSN
Bool found = False;
@@ -1094,11 +1095,14 @@ wm_handle_keypress(Wm *w, XKeyEvent *e)
return;
}
}
-
+
+ /* Don't care about Caps/Num/Scroll lock here */
+ state &= ~w->config->kb->lock_mask;
+
while (entry != NULL)
{
if (XKeycodeToKeysym(w->dpy, e->keycode, entry->index) == entry->key
- && e->state == entry->ModifierMask )
+ && state == entry->ModifierMask )
{
switch (entry->action)
{
--
2.8.0.rc3
More information about the yocto
mailing list