Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
gnome-settings-daemon.391
gnome-settings-daemon-icewm-cursor.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-settings-daemon-icewm-cursor.patch of Package gnome-settings-daemon.391
diff -Npur gnome-settings-daemon-3.10.2.bak/plugins/cursor/gsd-cursor-manager.c gnome-settings-daemon-3.10.2/plugins/cursor/gsd-cursor-manager.c --- gnome-settings-daemon-3.10.2.bak/plugins/cursor/gsd-cursor-manager.c 2014-12-05 09:04:34.626211196 +0800 +++ gnome-settings-daemon-3.10.2/plugins/cursor/gsd-cursor-manager.c 2014-12-05 09:05:13.610212123 +0800 @@ -58,6 +58,7 @@ struct GsdCursorManagerPrivate guint added_id; guint removed_id; guint changed_id; + gint name_watch_id; gboolean cursor_shown; GHashTable *monitors; @@ -409,6 +410,27 @@ register_manager_dbus (GsdCursorManager manager); } +static void +on_name_appeared (GDBusConnection *connection, + const char *name, + const char *name_owner, + gpointer user_data) +{ + GsdCursorManager *manager = user_data; + /* Start by hiding the cursor */ + set_cursor_visibility (manager, FALSE); +} + +static void +on_name_vanished (GDBusConnection *connection, + const char *name, + gpointer user_data) +{ + GsdCursorManager *manager = user_data; + /* if Mutter was not start or was replaced, show the cursor */ + set_cursor_visibility (manager, TRUE); +} + gboolean gsd_cursor_manager_start (GsdCursorManager *manager, GError **error) @@ -449,8 +471,15 @@ gsd_cursor_manager_start (GsdCursorManag return FALSE; } - /* Start by hiding the cursor */ - set_cursor_visibility (manager, FALSE); + gint id; + id = g_bus_watch_name (G_BUS_TYPE_SESSION, + "org.gnome.Mutter.IdleMonitor", + G_BUS_NAME_WATCHER_FLAGS_NONE, + on_name_appeared, + on_name_vanished, + manager, NULL); + manager->priv->name_watch_id = id; + manager->priv->cancellable = g_cancellable_new (); register_manager_dbus (manager); @@ -469,6 +498,11 @@ gsd_cursor_manager_stop (GsdCursorManage device_manager = gdk_display_get_device_manager (gdk_display_get_default ()); + if (manager->priv->name_watch_id) { + g_bus_unwatch_name (manager->priv->name_watch_id); + manager->priv->name_watch_id = 0; + } + if (manager->priv->added_id > 0) { g_signal_handler_disconnect (G_OBJECT (device_manager), manager->priv->added_id); manager->priv->added_id = 0; @@ -511,6 +545,7 @@ gsd_cursor_manager_init (GsdCursorManage manager->priv->cursor_shown = TRUE; manager->priv->show_osk = FALSE; + manager->priv->name_watch_id = 0; } GsdCursorManager *
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor