From 4b709f2dbee320a381c3da8f5621b8311c39dccf Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 20 Dec 2012 11:09:04 +0100 Subject: 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 file changed, 17 insertions(+) diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c index 88909886..6b038761 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; } -- cgit v1.2.1