Commit 9f617ae4 authored by Carlos Garnacho's avatar Carlos Garnacho

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

Closes: #779
parent 104bdde7
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment