diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2018-01-31 13:41:25 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-02-05 09:06:49 +0000 |
commit | db866eb0529753bbd4c572903616dba39298ebea (patch) | |
tree | 0975f05480210b07701f9356548f8d3db30301d6 | |
parent | d092e913d6541ed801d1d17af66e6ea715790d5d (diff) | |
download | mutter-db866eb0529753bbd4c572903616dba39298ebea.tar.gz |
wayland: send shortcut inhibit “active” event
The shortcut inhibitor protocol states that the “active” event should be
sent every time compositor shortcuts are inhibited on behalf of the
surface.
However, mutter would send that event only if the surface is focused,
which might not be the case if focus is on a shell surface.
Send the “active” event unconditionally to match the protocol
definition.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/10
-rw-r--r-- | src/wayland/meta-wayland-inhibit-shortcuts.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/wayland/meta-wayland-inhibit-shortcuts.c b/src/wayland/meta-wayland-inhibit-shortcuts.c index 272ae5f2c..1a831607f 100644 --- a/src/wayland/meta-wayland-inhibit-shortcuts.c +++ b/src/wayland/meta-wayland-inhibit-shortcuts.c @@ -89,19 +89,13 @@ static void shortcuts_inhibited_cb (MetaWaylandSurface *surface, MetaWaylandKeyboardShotscutsInhibit *shortcut_inhibit) { - MetaWaylandKeyboard *keyboard = shortcut_inhibit->seat->keyboard; - - /* Send active event only if the surface has keyboard focus */ - if (keyboard->focus_surface == surface) - zwp_keyboard_shortcuts_inhibitor_v1_send_active (shortcut_inhibit->resource); + zwp_keyboard_shortcuts_inhibitor_v1_send_active (shortcut_inhibit->resource); } static void -shortcuts_restored_cb (MetaWaylandSurface *surface, - gpointer user_data) +shortcuts_restored_cb (MetaWaylandSurface *surface, + MetaWaylandKeyboardShotscutsInhibit *shortcut_inhibit) { - MetaWaylandKeyboardShotscutsInhibit *shortcut_inhibit = user_data; - zwp_keyboard_shortcuts_inhibitor_v1_send_inactive (shortcut_inhibit->resource); } |