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.
This commit is contained in:
parent
604d2155ba
commit
c8f015c6d7
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue