backends: Do not set up the root cursor on invisible window pointers

Commit b1a0bf891 broke the previous logic that we would only fallback
to the root cursor if 1) windows are not interactable or 2) no window
cursor is currently set (i.e. not hovering over any window). Now it
will set up the root cursor if it's NULL, which breaks clients
explicitly setting an invisible cursor. This commit restaurates the
previous behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=754806
This commit is contained in:
Carlos Garnacho 2017-11-20 13:08:06 +01:00
parent 1790320ba3
commit 3067dab84c

View File

@ -66,13 +66,10 @@ update_displayed_cursor (MetaCursorTracker *tracker)
MetaDisplay *display = meta_get_display ();
MetaCursorSprite *cursor = NULL;
if (display && meta_display_windows_are_interactable (display))
{
if (tracker->has_window_cursor)
if (display && meta_display_windows_are_interactable (display) &&
tracker->has_window_cursor)
cursor = tracker->window_cursor;
}
if (!cursor)
else
cursor = tracker->root_cursor;
if (tracker->displayed_cursor == cursor)