Commit 1c2e8fcf authored by Andrea Azzarone's avatar Andrea Azzarone 🚴 Committed by Carlos Garnacho

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.

parent 00ca387e
Pipeline #61009 passed with stages
in 7 minutes and 25 seconds
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment