summaryrefslogtreecommitdiff
path: root/i3lock.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2011-10-30 13:22:50 +0000
committerMichael Stapelberg <michael@stapelberg.de>2011-10-30 13:22:50 +0000
commit28fe00c7650a5b0967910008108906f073ded7ee (patch)
treeecb1eb1986d8fc5f33d3cb2ec030b1ef8fdfb7d6 /i3lock.c
parent9f6ef913377db057ed4c8e8ce199b3ff978b8b67 (diff)
Bugfix: Properly detect the release of ISO_Level3_Shift (Thanks bacardi55)
Diffstat (limited to 'i3lock.c')
-rw-r--r--i3lock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/i3lock.c b/i3lock.c
index 2c88f5c..d34a562 100644
--- a/i3lock.c
+++ b/i3lock.c
@@ -123,10 +123,11 @@ static void handle_key_release(xcb_key_release_event_t *event) {
DEBUG("releasing key %d, state raw = %d, modeswitch_active = %d, iso_level3_shift_active = %d\n",
event->detail, event->state, modeswitch_active, iso_level3_shift_active);
- /* fix state */
- event->state &= ~numlockmask;
-
- xcb_keysym_t sym = xcb_key_press_lookup_keysym(symbols, event, event->state);
+ /* We don’t care about the column here and just use the first symbol. Since
+ * we only check for Mode_switch and ISO_Level3_Shift, this *should* work.
+ * Also, if we would use the current column, we would look in the wrong
+ * place. */
+ xcb_keysym_t sym = xcb_key_press_lookup_keysym(symbols, event, 0);
if (sym == XK_Mode_switch) {
//printf("Mode switch disabled\n");
modeswitch_active = false;