wayland: Check pointer visibility on post-grab focus changes
Just like sync_focus_surface() does, we shouldn't set a focus surface while the pointer is hidden, so the illusion that there is none remains. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/779
This commit is contained in:
parent
9f617ae43d
commit
7735a919d1
@ -427,6 +427,14 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
|
|||||||
MetaWaylandPointer *pointer = grab->pointer;
|
MetaWaylandPointer *pointer = grab->pointer;
|
||||||
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
|
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
|
||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
|
||||||
|
|
||||||
|
if (!meta_wayland_seat_has_pointer (seat))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!meta_cursor_tracker_get_pointer_visible (cursor_tracker))
|
||||||
|
return;
|
||||||
|
|
||||||
if (pointer->button_count > 0)
|
if (pointer->button_count > 0)
|
||||||
return;
|
return;
|
||||||
@ -444,7 +452,6 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meta_wayland_seat_has_pointer (seat))
|
|
||||||
meta_wayland_pointer_set_focus (pointer, surface);
|
meta_wayland_pointer_set_focus (pointer, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user