[mutter] backends: Trigger MetaCursorTracker::cursor-changed on texture changes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends: Trigger MetaCursorTracker::cursor-changed on texture changes
- Date: Fri, 17 Nov 2017 16:26:53 +0000 (UTC)
commit f45df4265d089dc4df22a411161db53e5a06bff7
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Nov 16 19:26:41 2017 +0100
backends: Trigger MetaCursorTracker::cursor-changed on texture changes
So we allow gnome-shell's magnifier to update fake cursors while it's
turned on.
https://bugzilla.gnome.org/show_bug.cgi?id=754806
src/backends/meta-cursor-tracker.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c
index 3cdab83..f1562a2 100644
--- a/src/backends/meta-cursor-tracker.c
+++ b/src/backends/meta-cursor-tracker.c
@@ -53,6 +53,13 @@ enum {
static guint signals[LAST_SIGNAL];
+static void
+cursor_texture_updated (MetaCursorSprite *cursor,
+ MetaCursorTracker *tracker)
+{
+ g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
+}
+
static gboolean
update_displayed_cursor (MetaCursorTracker *tracker)
{
@@ -71,7 +78,12 @@ update_displayed_cursor (MetaCursorTracker *tracker)
if (tracker->displayed_cursor == cursor)
return FALSE;
+ g_signal_handlers_disconnect_by_func (tracker->displayed_cursor,
+ cursor_texture_updated,
+ tracker);
g_set_object (&tracker->displayed_cursor, cursor);
+ g_signal_connect (tracker->displayed_cursor, "texture-changed",
+ G_CALLBACK (cursor_texture_updated), tracker);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]