cursor-tracker: Emit cursor-changed after renderer was updated

Otherwise the cursor retrieved via meta_cursor_renderer_get_cursor() is
out of date.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
This commit is contained in:
Jonas Ådahl 2019-01-03 16:40:42 +01:00 committed by Ray Strode
parent 0ec335395d
commit ffa30f50f2

View File

@ -118,11 +118,15 @@ change_cursor_renderer (MetaCursorTracker *tracker)
static void static void
sync_cursor (MetaCursorTracker *tracker) sync_cursor (MetaCursorTracker *tracker)
{ {
if (update_displayed_cursor (tracker)) gboolean cursor_changed = FALSE;
g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
cursor_changed = update_displayed_cursor (tracker);
if (update_effective_cursor (tracker)) if (update_effective_cursor (tracker))
change_cursor_renderer (tracker); change_cursor_renderer (tracker);
if (cursor_changed)
g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
} }
static void static void