]> git.sur5r.net Git - i3/i3/commit
Correctly handle bindings for the same mod key with and without --release
authorOrestis Floros <orestisf1993@gmail.com>
Fri, 16 Mar 2018 01:38:13 +0000 (03:38 +0200)
committerOrestis Floros <orestisf1993@gmail.com>
Tue, 20 Mar 2018 02:09:25 +0000 (04:09 +0200)
commitff579ef22f7ba2fa4762564f84bfa062e79cfaa2
treefc409098663f86deb35a5431781cb0c3f4577cd8
parent130b3ce3a9cf249e96719f8f90f2ac462112cca7
Correctly handle bindings for the same mod key with and without --release

Before this commit, get_binding() exited on the first match without
marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS.

Similarly, once it found a --release binding during a KeyPress event it
would stop searching for a matching key press binding.

Example config, placing the --release line first will trigger the second
problem:

# i3 config file (v4)
bindsym Super_L exec notify-send "press"
# or
# bindcode 133 exec notify-send "press"
bindsym --release Super_L exec notify-send "release"
# or
# bindcode --release 133 exec notify-send "release"

Fixes #2733
src/bindings.c
testcases/t/258-keypress-release.t