wayland: add inhibit shortcut mechanism

Add a mechanism to MetaWaylandSurface that inhibits compositor's own
shortcuts when the surface has input focus, so that clients can receive
all key events regardless of the compositor own shortcuts.

This will help with implementing "fake" active grabs in Wayland and
XWayland clients.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
This commit is contained in:
Olivier Fourdan
2017-03-17 13:34:52 +01:00
parent c54377e3ba
commit dd12f569d9
11 changed files with 222 additions and 15 deletions

View File

@@ -8066,3 +8066,17 @@ meta_window_get_placement_rule (MetaWindow *window)
{
return window->placement_rule;
}
void
meta_window_force_restore_shortcuts (MetaWindow *window,
ClutterInputDevice *source)
{
META_WINDOW_GET_CLASS (window)->force_restore_shortcuts (window, source);
}
gboolean
meta_window_shortcuts_inhibited (MetaWindow *window,
ClutterInputDevice *source)
{
return META_WINDOW_GET_CLASS (window)->shortcuts_inhibited (window, source);
}