wayland: Warn if a surface is being set while the pointer is invisible

This is an unexpected condition, better not to fall in it without further
indications.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/779
This commit is contained in:
Carlos Garnacho 2019-09-12 19:17:06 +02:00
parent 104bdde746
commit 9f617ae43d

View File

@ -887,6 +887,11 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface)
{
MetaWaylandInputDevice *input_device = META_WAYLAND_INPUT_DEVICE (pointer);
MetaBackend *backend = meta_get_backend ();
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
g_return_if_fail (meta_cursor_tracker_get_pointer_visible (cursor_tracker) ||
surface == NULL);
if (pointer->focus_surface == surface)
return;