mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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
This commit is contained in:
parent
d092e913d6
commit
db866eb052
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user