[mutter/gnome-3-34] keybindings: Mask out the reserved modifiers mask
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-34] keybindings: Mask out the reserved modifiers mask
- Date: Thu, 30 Apr 2020 14:46:12 +0000 (UTC)
commit 4078ba182849003584567584708a08cd846b1e80
Author: Olivier Fourdan <ofourdan redhat com>
Date: Mon Apr 27 17:01:22 2020 +0200
keybindings: Mask out the reserved modifiers mask
When switching layouts, special modifiers bits may be be set for
internal use by Xkb.
As we now ignore a set of modifiers when processing the special
modifiers keys, we ought to also mask out those reserved modifiers
otherwise we would discard the [Super] key after switching layouts
in X11.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1144
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1219
(cherry picked from commit 61356caa0693f19ccb289597bbab5138319e7f3c)
src/core/keybindings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index fadbc90fc..27d945289 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -2123,7 +2123,7 @@ process_special_modifier_key (MetaDisplay *display,
return TRUE;
}
else if (event->type == CLUTTER_KEY_PRESS &&
- (event->modifier_state & ~(IGNORED_MODIFIERS)) == 0 &&
+ ((event->modifier_state & ~(IGNORED_MODIFIERS)) & CLUTTER_MODIFIER_MASK) == 0 &&
resolved_key_combo_has_keycode (resolved_key_combo,
event->hardware_keycode))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]