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 | fc6446f32649dfdffbcd8fff6ebe35122e5648f3 (patch) | |
tree | 8f390b0a3a23e17012d409c9ec3e724c7b7691c0 | |
parent | 6aafdbebd916a4358d3383ad18c6c3ae9cac590c (diff) | |
download | mutter-fc6446f32649dfdffbcd8fff6ebe35122e5648f3.tar.gz |
backends/x11: Iterate button modifiers all the way
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
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1617>
-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; |