Check for B_UPON_KEYRELEASE_IGNORE_MODS with bindsyms

From 548d74015c:
> 1. press $mod, press x, release x, release $mod
> 2. press $mod, press x, release $mod, release x

case (2.) didn't work, now it should be fixed.
This commit is contained in:
Orestis Floros
2018-03-17 23:28:23 +02:00
parent 9d22d2efce
commit 130b3ce3a9
2 changed files with 27 additions and 1 deletions

View File

@ -236,7 +236,8 @@ static Binding *get_binding(i3_event_state_mask_t state_filtered, bool is_releas
const bool mods_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 (binding_keycode->keycode == input_keycode &&
(mods_match || (bind->release == B_UPON_KEYRELEASE_IGNORE_MODS && is_release))) {
found_keycode = true;
break;
}