From 0acd11a8d71a120edf3d2cfe327ec678bb1b63af Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 24 May 2017 20:41:17 +0200 Subject: [PATCH] no-op change: move bind->release check into loop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We don’t have to negate the check anymore, making it more readable. --- src/bindings.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index 0a994f55..e9aec2c6 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -268,14 +268,12 @@ 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 (mods_match) { + if (mods_match || (bind->release == B_UPON_KEYRELEASE_IGNORE_MODS && is_release)) { found_keycode = true; break; } } - if (!found_keycode && - (bind->release != B_UPON_KEYRELEASE_IGNORE_MODS || - !is_release)) { + if (!found_keycode) { continue; } } -- 2.39.5