mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 23:46:33 -05: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
@ -1593,8 +1593,9 @@ handle_external_grab (MetaDisplay *display,
|
||||
|
||||
|
||||
guint
|
||||
meta_display_grab_accelerator (MetaDisplay *display,
|
||||
const char *accelerator)
|
||||
meta_display_grab_accelerator (MetaDisplay *display,
|
||||
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);
|
||||
|
@ -157,8 +157,9 @@ gboolean meta_display_remove_keybinding (MetaDisplay *display,
|
||||
const char *name);
|
||||
|
||||
META_EXPORT
|
||||
guint meta_display_grab_accelerator (MetaDisplay *display,
|
||||
const char *accelerator);
|
||||
guint meta_display_grab_accelerator (MetaDisplay *display,
|
||||
const char *accelerator,
|
||||
MetaKeyBindingFlags flags);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
|
Loading…
Reference in New Issue
Block a user