diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-11-30 19:02:28 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-11-30 19:05:36 +0100 |
commit | 4a74ce33877320c842c3e82151d2cb8ca4845ed7 (patch) | |
tree | 8f390b0a3a23e17012d409c9ec3e724c7b7691c0 | |
parent | 91c0aa6a54ccf912dcf88e2a7174708ff1288f94 (diff) | |
download | mutter-wip/carlosg/modifier-query-x11.tar.gz |
backends/x11: Iterate button modifiers all the waywip/carlosg/modifier-query-x11
This is misuse of XIMaskLen (on a mask len! not the right mask!).
Have this iterate all possible values stored in the button state.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1559
-rw-r--r-- | src/backends/x11/meta-seat-x11.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c index e320a1e4c..a1d1cc5e1 100644 --- a/src/backends/x11/meta-seat-x11.c +++ b/src/backends/x11/meta-seat-x11.c @@ -1506,7 +1506,7 @@ translate_state (XIButtonState *button_state, if (button_state) { - for (i = 1; i < XIMaskLen (button_state->mask_len); i++) + for (i = 1; i <= button_state->mask_len * 8; i++) { if (!XIMaskIsSet (button_state->mask, i)) continue; |