[gnome-settings-daemon] wacom: Fix critical warnings on shutdown



commit 935a0b13065d8bf8aa77a922f7db911689e20942
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Dec 6 14:14:48 2013 +0100

    wacom: Fix critical warnings on shutdown
    
    GdkDevices aint' GsdWacomDevices, so lookup the latter from the former.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719972

 plugins/wacom/gsd-wacom-manager.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 5b4484f..539c8d1 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1934,14 +1934,19 @@ gsd_wacom_manager_stop (GsdWacomManager *manager)
                 devices = gdk_device_manager_list_devices (p->device_manager, GDK_DEVICE_TYPE_SLAVE);
                 for (l = devices; l != NULL; l = l->next) {
                         GsdWacomDeviceType type;
+                        GsdWacomDevice *device;
+                        int id;
 
-                        type = gsd_wacom_device_get_device_type (l->data);
-                        if (type == WACOM_TYPE_PAD) {
-                                int id;
+                        id = gdk_x11_device_get_id (l->data);
+                        device = device_id_to_device (manager, id);
 
-                                id = get_device_id (l->data);
+                        if (!device)
+                                continue;
+
+                        type = gsd_wacom_device_get_device_type (device);
+
+                        if (type == WACOM_TYPE_PAD)
                                 grab_button (id, FALSE, manager->priv->screen);
-                        }
                 }
                 g_list_free (devices);
 


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