From ffa30f50f265f0b114e7d644efd4ee1bd0fe96bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 3 Jan 2019 16:40:42 +0100 Subject: [PATCH] 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 --- src/backends/meta-cursor-tracker.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c index 060b6af3b..97e7f8cb4 100644 --- a/src/backends/meta-cursor-tracker.c +++ b/src/backends/meta-cursor-tracker.c @@ -118,11 +118,15 @@ change_cursor_renderer (MetaCursorTracker *tracker) static void sync_cursor (MetaCursorTracker *tracker) { - if (update_displayed_cursor (tracker)) - g_signal_emit (tracker, signals[CURSOR_CHANGED], 0); + gboolean cursor_changed = FALSE; + + cursor_changed = update_displayed_cursor (tracker); if (update_effective_cursor (tracker)) change_cursor_renderer (tracker); + + if (cursor_changed) + g_signal_emit (tracker, signals[CURSOR_CHANGED], 0); } static void