window: Add "is_focus_async" API

X11 clients can use different models of input handling, of which some
may not result focus being set synchronously.

For such clients, meta_focus_window() will not change the focus itself
but rely on the client itself to set the input focus on the desired
window.

Add a new MetaWindow API to check when dealing with such a window.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1716>
This commit is contained in:
Olivier Fourdan
2021-02-11 17:53:59 +01:00
committed by Marge Bot
parent 9de36fed4d
commit 6438919a89
4 changed files with 26 additions and 0 deletions

View File

@ -708,6 +708,12 @@ meta_window_wayland_are_updates_frozen (MetaWindow *window)
return !wl_window->has_been_shown;
}
static gboolean
meta_window_wayland_is_focus_async (MetaWindow *window)
{
return FALSE;
}
static MetaStackLayer
meta_window_wayland_calculate_layer (MetaWindow *window)
{
@ -764,6 +770,7 @@ meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
window_class->calculate_layer = meta_window_wayland_calculate_layer;
window_class->map = meta_window_wayland_map;
window_class->unmap = meta_window_wayland_unmap;
window_class->is_focus_async = meta_window_wayland_is_focus_async;
}
MetaWindow *