Files
gtk/gdk
Simon McVittie 79285bd63e gdkevents: Don't ignore modifiers that are not currently active
The X11 backend can mark modifiers like Shift as consumed even if they
aren't actually active, which seems to be something to do with making
shortcuts like `<Control><Shift>plus` and `<Control>plus` work as
intended regardless of whether the plus symbol is obtained by pressing
Shift and a key (like `+/=` on American, British or French keyboards)
or not (like `*/+` on German keyboards).

However, this can go badly wrong when the modifier is *not* pressed.
For example, terminals normally have separate bindings for `<Control>c`
(send SIGINT) and `<Control><Shift>c` (copy). If we disregard the
consumed modifiers completely, when the X11 backend marks Shift as
consumed, pressing Ctrl+c would send SIGINT *and* copy to the clipboard,
which is not what was intended.

By masking out the members of `consumed` that are not in `state`, we
get the same interpretation for X11 and Wayland, and ensure that
keyboard shortcuts that explicitly mention Shift can only be triggered
while holding Shift. It continues to be possible to trigger keyboard
shortcuts that do not explicitly mention Shift (such as `<Control>plus`)
while holding Shift, if the backend reports Shift as having been
consumed in order to generate the plus keysym.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/5095
Bug-Debian: https://bugs.debian.org/1016927
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-09-17 19:40:53 +01:00
..
2022-08-22 10:48:00 -04:00
2022-08-25 14:33:30 -04:00
2021-10-26 20:59:37 +02:00
2021-09-24 22:50:29 +02:00
2021-09-24 22:50:29 +02:00
2022-08-25 14:33:30 -04:00
2022-08-25 14:33:30 -04:00
2021-05-22 17:25:26 -04:00
2022-06-06 08:55:51 -04:00
2021-05-22 17:25:26 -04:00
2021-10-26 20:59:37 +02:00
2022-05-12 09:06:20 -04:00
2021-10-26 20:59:37 +02:00
2021-05-22 17:25:26 -04:00
2021-10-06 22:50:07 +02:00
2021-10-26 20:59:37 +02:00
2021-10-26 20:59:37 +02:00
2021-09-24 22:50:29 +02:00
2021-09-24 22:50:29 +02:00
2021-09-10 16:56:42 -05:00
2021-09-24 22:50:29 +02:00
2022-07-16 09:43:46 -04:00
2022-07-16 09:43:46 -04:00
2021-10-26 20:59:37 +02:00
2022-08-25 14:33:30 -04:00
2021-08-29 04:29:02 +02:00
2022-01-22 23:10:53 -05:00
2022-08-19 02:38:11 +02:00
2021-05-22 21:21:10 -04:00
2021-10-26 20:59:37 +02:00
2021-05-22 17:25:26 -04:00
2021-10-06 03:44:59 +02:00
2022-08-25 14:33:30 -04:00
2021-05-22 17:25:26 -04:00
2021-10-26 20:59:37 +02:00
2022-02-22 22:55:48 -05:00
2021-10-18 08:35:54 -04:00
2021-10-26 20:59:37 +02:00