[mutter] keybindings: Ignore extra modifier bits when matching iso_next_group
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keybindings: Ignore extra modifier bits when matching iso_next_group
- Date: Tue, 2 Sep 2014 16:39:28 +0000 (UTC)
commit c8f015c6d7b98b041152afc11c3a3ecc823547b2
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Sep 2 18:11:31 2014 +0200
keybindings: Ignore extra modifier bits when matching iso_next_group
Clutter events include the layout index codified into modifier_state,
unlike XI2 device events, which means that we need to mask it out so
that we can match successfully.
src/core/keybindings.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index fe7eccd..1dc80fc 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1877,6 +1877,8 @@ process_iso_next_group (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
gboolean activate;
+ guint32 keycode;
+ guint32 modifiers;
int i;
if (event->type == CLUTTER_KEY_RELEASE)
@@ -1884,10 +1886,13 @@ process_iso_next_group (MetaDisplay *display,
activate = FALSE;
+ keycode = event->hardware_keycode;
+ modifiers = event->modifier_state & 0xff & ~keys->ignored_modifier_mask;
+
for (i = 0; i < keys->n_iso_next_group_combos; ++i)
{
- if (event->hardware_keycode == keys->iso_next_group_combos[i].keycode &&
- event->modifier_state == (unsigned int)keys->iso_next_group_combos[i].modifiers)
+ if (keycode == keys->iso_next_group_combos[i].keycode &&
+ modifiers == keys->iso_next_group_combos[i].modifiers)
{
/* If the signal handler returns TRUE the keyboard will
remain frozen. It's the signal handler's responsibility
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]