[gnome-settings-daemon/gnome-3-6] wacom: Stop capturing mouse buttons when deactivating



commit 4b709f2dbee320a381c3da8f5621b8311c39dccf
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 20 11:09:04 2012 +0100

    wacom: Stop capturing mouse buttons when deactivating
    
    Otherwise disabling the wacom plugin still has the mouse buttons
    grabbed on the device.

 plugins/wacom/gsd-wacom-manager.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 8890988..6b03876 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1381,8 +1381,25 @@ gsd_wacom_manager_stop (GsdWacomManager *manager)
         g_debug ("Stopping wacom manager");
 
         if (p->device_manager != NULL) {
+                GList *devices;
+
                 g_signal_handler_disconnect (p->device_manager, p->device_added_id);
                 g_signal_handler_disconnect (p->device_manager, p->device_removed_id);
+
+                devices = gdk_device_manager_list_devices (p->device_manager, GDK_DEVICE_TYPE_SLAVE);
+                for (l = devices; l != NULL; l = l->next) {
+                        GsdWacomDeviceType type;
+
+                        type = gsd_wacom_device_get_device_type (l->data);
+                        if (type == WACOM_TYPE_PAD) {
+                                int id;
+
+                                id = get_device_id (l->data);
+                                grab_button (id, FALSE, manager->priv->screens);
+                        }
+                }
+                g_list_free (devices);
+
                 p->device_manager = NULL;
         }
 



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