diff options
| author | Carlos Garnacho <carlosg@gnome.org> | 2013-12-06 13:14:48 (GMT) |
|---|---|---|
| committer | Carlos Garnacho <carlosg@gnome.org> | 2013-12-10 13:02:27 (GMT) |
| commit | 935a0b13065d8bf8aa77a922f7db911689e20942 (patch) | |
| tree | bf89a1699e081628a7c6eb7d348fd80c0b35a125 | |
| parent | 17b0a43b3f7d2fe31d25a95850489bb3a869bcb7 (diff) | |
| download | gnome-settings-daemon-935a0b13065d8bf8aa77a922f7db911689e20942.zip gnome-settings-daemon-935a0b13065d8bf8aa77a922f7db911689e20942.tar.xz | |
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
| -rw-r--r-- | 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); |
