diff options
author | Bastien Nocera <hadess@hadess.net> | 2012-12-20 11:09:04 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2012-12-20 11:10:46 +0100 |
commit | 4b709f2dbee320a381c3da8f5621b8311c39dccf (patch) | |
tree | b9fc1eac2682f0b4cf622849d253dfe5f9a43ea5 | |
parent | dda2594233a3fdf1aca8ae5158e6c0f33a335869 (diff) | |
download | gnome-settings-daemon-4b709f2dbee320a381c3da8f5621b8311c39dccf.tar.gz |
wacom: Stop capturing mouse buttons when deactivating
Otherwise disabling the wacom plugin still has the mouse buttons
grabbed on the device.
-rw-r--r-- | 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 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; } |