From: Michael Stapelberg Date: Tue, 23 May 2017 06:28:56 +0000 (+0200) Subject: Fix --release bindings broken by previous commit X-Git-Tag: 4.14~29^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2bd3639fbb58e92d4d3babde0956bb9f003c0335;p=i3%2Fi3 Fix --release bindings broken by previous commit fixes #2559 --- diff --git a/src/bindings.c b/src/bindings.c index 8d54c6eb..a8b897af 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -274,7 +274,9 @@ static Binding *get_binding(i3_event_state_mask_t state_filtered, bool is_releas break; } } - if (!found_keycode) { + if (!found_keycode && + (bind->release != B_UPON_KEYRELEASE_IGNORE_MODS || + !is_release)) { continue; } } diff --git a/testcases/t/264-keypress-numlock.t b/testcases/t/264-keypress-numlock.t index 464fe748..90a403af 100644 --- a/testcases/t/264-keypress-numlock.t +++ b/testcases/t/264-keypress-numlock.t @@ -206,6 +206,49 @@ is(scalar @i3test::XTEST::binding_events, 12, 'Received exactly 12 binding event exit_gracefully($pid); +################################################################################ +# Verify bindings for modifiers work +################################################################################ + +$config = <