keybinding: Store flags in MetaKeyGrab
The external grab handler is shared across all external bindings and external bindings have now different binding flags. For this reason, when rebuilding the binding table there could be loss of information if we assign the bindings flags of the external handler to all external bindings. Let's store the bindings flags in MetaKeyGrab too and use this when rebuilding the binding table to avoid the above issue. https://gitlab.gnome.org/GNOME/mutter/merge_requests/169
This commit is contained in:
parent
00ca387ec7
commit
1c2e8fcf06
@ -203,6 +203,7 @@ struct _MetaKeyGrab {
|
||||
char *name;
|
||||
guint action;
|
||||
MetaKeyCombo combo;
|
||||
gint flags;
|
||||
};
|
||||
|
||||
static void
|
||||
@ -834,7 +835,7 @@ rebuild_binding_table (MetaKeyBindingManager *keys,
|
||||
b = g_slice_new0 (MetaKeyBinding);
|
||||
b->name = grab->name;
|
||||
b->handler = handler;
|
||||
b->flags = handler->flags;
|
||||
b->flags = grab->flags;
|
||||
b->combo = grab->combo;
|
||||
|
||||
g_hash_table_add (keys->key_bindings, b);
|
||||
@ -1629,6 +1630,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
|
||||
grab->action = next_dynamic_keybinding_action ();
|
||||
grab->name = meta_external_binding_name_for_action (grab->action);
|
||||
grab->combo = combo;
|
||||
grab->flags = flags;
|
||||
|
||||
g_hash_table_insert (external_grabs, grab->name, grab);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user