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:
parent
104bdde746
commit
9f617ae43d
@ -887,6 +887,11 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
|
|||||||
MetaWaylandSurface *surface)
|
MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
MetaWaylandInputDevice *input_device = META_WAYLAND_INPUT_DEVICE (pointer);
|
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)
|
if (pointer->focus_surface == surface)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user