[gnome-settings-daemon/gnome-3-8] cursor: set an error if we can't create a monitor



commit 294922b7e34bb4c726ce6dcc9c7e66d56dca3f7b
Author: Emilio Pozuelo Monfort <pochu27 gmail com>
Date:   Wed Mar 27 16:12:05 2013 +0100

    cursor: set an error if we can't create a monitor
    
    Otherwise we crash in impl_activate()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696707

 plugins/cursor/gsd-cursor-manager.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/cursor/gsd-cursor-manager.c b/plugins/cursor/gsd-cursor-manager.c
index 3384f6b..16b8336 100644
--- a/plugins/cursor/gsd-cursor-manager.c
+++ b/plugins/cursor/gsd-cursor-manager.c
@@ -168,8 +168,11 @@ add_device (GdkDeviceManager *device_manager,
 
         /* Create IdleMonitors for each pointer device */
         monitor = gnome_idle_monitor_new_for_device (device);
-        if (!monitor)
+        if (!monitor) {
+                g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+                             "Per-device idletime monitor not available");
                 return FALSE;
+        }
         g_hash_table_insert (manager->priv->monitors,
                              device,
                              monitor);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]