cursor-tracker/x11: Also update sprite when updating position

Without doing this, we'd use the same sprite that was last set by
mutter, most likely a leftptr cursor, and fail to update when e.g.
moving the pointer above a text entry and the displayed cursor updated
to a cursor position marker.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1391
This commit is contained in:
Jonas Ådahl
2020-07-31 21:21:23 +02:00
parent 2d010c9b84
commit fc778e2bd3
3 changed files with 37 additions and 6 deletions

View File

@ -543,7 +543,7 @@ meta_cursor_tracker_untrack_position (MetaCursorTracker *tracker)
MetaCursorTrackerPrivate *priv =
meta_cursor_tracker_get_instance_private (tracker);
g_return_if_fail (priv->track_position_count <= 0);
g_return_if_fail (priv->track_position_count > 0);
priv->track_position_count--;
if (priv->track_position_count == 0)
@ -588,3 +588,12 @@ meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker)
return priv->displayed_cursor;
}
MetaBackend *
meta_cursor_tracker_get_backend (MetaCursorTracker *tracker)
{
MetaCursorTrackerPrivate *priv =
meta_cursor_tracker_get_instance_private (tracker);
return priv->backend;
}