mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
keybindings: Add flag param to grab_accelerator
Add a 'flags' parameters to meta_display_grab_accelerator. This will allow e.g. gnome-settings-daemon (through the gnome-shell's GrabAccelerator API) to create shorcuts that should descard auto-repeated key events. https://gitlab.gnome.org/GNOME/mutter/merge_requests/169 Closes: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/68
This commit is contained in:
parent
5688f1cf6e
commit
00ca387ec7
@ -1594,7 +1594,8 @@ handle_external_grab (MetaDisplay *display,
|
||||
|
||||
guint
|
||||
meta_display_grab_accelerator (MetaDisplay *display,
|
||||
const char *accelerator)
|
||||
const char *accelerator,
|
||||
MetaKeyBindingFlags flags)
|
||||
{
|
||||
MetaKeyBindingManager *keys = &display->key_binding_manager;
|
||||
MetaKeyBinding *binding;
|
||||
@ -1636,6 +1637,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
|
||||
binding->handler = HANDLER ("external-grab");
|
||||
binding->combo = combo;
|
||||
binding->resolved_combo = resolved_combo;
|
||||
binding->flags = flags;
|
||||
|
||||
g_hash_table_add (keys->key_bindings, binding);
|
||||
index_binding (keys, binding);
|
||||
|
@ -158,7 +158,8 @@ gboolean meta_display_remove_keybinding (MetaDisplay *display,
|
||||
|
||||
META_EXPORT
|
||||
guint meta_display_grab_accelerator (MetaDisplay *display,
|
||||
const char *accelerator);
|
||||
const char *accelerator,
|
||||
MetaKeyBindingFlags flags);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
|
Loading…
Reference in New Issue
Block a user