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

@@ -535,6 +535,10 @@ struct _MetaWindowClass
gboolean user_op);
void (*main_monitor_changed) (MetaWindow *window,
const MetaLogicalMonitor *old);
void (*force_restore_shortcuts) (MetaWindow *window,
ClutterInputDevice *source);
gboolean (*shortcuts_inhibited) (MetaWindow *window,
ClutterInputDevice *source);
};
/* These differ from window->has_foo_func in that they consider
@@ -763,4 +767,9 @@ MetaPlacementRule *meta_window_get_placement_rule (MetaWindow *window);
void meta_window_force_placement (MetaWindow *window);
void meta_window_force_restore_shortcuts (MetaWindow *window,
ClutterInputDevice *source);
gboolean meta_window_shortcuts_inhibited (MetaWindow *window,
ClutterInputDevice *source);
#endif