From 6d9b165fb442003375c6de3a6c2d03b10d487ba9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 24 May 2017 20:40:17 +0200 Subject: [PATCH] =?utf8?q?no-op=20change:=20don=E2=80=99t=20compare=20keyc?= =?utf8?q?ode=20for=20every=20modifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/bindings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index a8b897af..0a994f55 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -261,7 +261,6 @@ static Binding *get_binding(i3_event_state_mask_t state_filtered, bool is_releas continue; } - xcb_keycode_t input_keycode = (xcb_keycode_t)input_code; bool found_keycode = false; struct Binding_Keycode *binding_keycode; TAILQ_FOREACH(binding_keycode, &(bind->keycodes_head), keycodes) { @@ -269,7 +268,7 @@ static Binding *get_binding(i3_event_state_mask_t state_filtered, bool is_releas const bool mods_match = modifiers_match(modifiers_mask, modifiers_state); DLOG("binding_keycode->modifiers = %d, modifiers_mask = %d, modifiers_state = %d, mods_match = %s\n", binding_keycode->modifiers, modifiers_mask, modifiers_state, (mods_match ? "yes" : "no")); - if (binding_keycode->keycode == input_keycode && mods_match) { + if (mods_match) { found_keycode = true; break; } -- 2.39.2