[mutter] cursor-tracker: Emit `cursor-changed` after renderer was updated
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-tracker: Emit `cursor-changed` after renderer was updated
- Date: Wed, 16 Jan 2019 17:16:15 +0000 (UTC)
commit c45d5f53ff0f96855319dce968b5082bcc5f37ed
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Jan 3 16:40:42 2019 +0100
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 7ff0e7b0c..0d49327f4 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]