Merge lp:~seb128/unity-settings-daemon/wacom_device_type into lp:unity-settings-daemon

Proposed by Sebastien Bacher on 2015-10-22
Status: Merged
Approved by: Lars Karlitski on 2015-10-23
Approved revision: 4111
Merged at revision: 4115
Proposed branch: lp:~seb128/unity-settings-daemon/wacom_device_type
Merge into: lp:unity-settings-daemon
Diff against target: 29 lines (+12/-7)
1 file modified
plugins/wacom/gsd-wacom-manager.c (+12/-7)
To merge this branch: bzr merge lp:~seb128/unity-settings-daemon/wacom_device_type
Reviewer Review Type Date Requested Status
Lars Karlitski (community) 2015-10-22 Approve on 2015-10-23
Review via email: mp+275305@code.launchpad.net

Commit Message

wacom: backport upstream change to use correct device types

"GdkDevices aint' GsdWacomDevices, so lookup the latter from the former.
https://bugzilla.gnome.org/show_bug.cgi?id=719972"

Description of the Change

wacom: backport upstream change to use correct device types

"GdkDevices aint' GsdWacomDevices, so lookup the latter from the former.
https://bugzilla.gnome.org/show_bug.cgi?id=719972"

To post a comment you must log in.
Lars Karlitski (larsu) wrote :

Ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/wacom/gsd-wacom-manager.c'
2--- plugins/wacom/gsd-wacom-manager.c 2015-10-07 16:32:40 +0000
3+++ plugins/wacom/gsd-wacom-manager.c 2015-10-22 11:03:27 +0000
4@@ -1485,14 +1485,19 @@
5 devices = gdk_device_manager_list_devices (p->device_manager, GDK_DEVICE_TYPE_SLAVE);
6 for (l = devices; l != NULL; l = l->next) {
7 GsdWacomDeviceType type;
8-
9- type = gsd_wacom_device_get_device_type (l->data);
10- if (type == WACOM_TYPE_PAD) {
11- int id;
12-
13- id = get_device_id (l->data);
14+ GsdWacomDevice *device;
15+ int id;
16+
17+ id = gdk_x11_device_get_id (l->data);
18+ device = device_id_to_device (manager, id);
19+
20+ if (!device)
21+ continue;
22+
23+ type = gsd_wacom_device_get_device_type (device);
24+
25+ if (type == WACOM_TYPE_PAD)
26 grab_button (id, FALSE, manager->priv->screens);
27- }
28 }
29 g_list_free (devices);
30

Subscribers

People subscribed via source and target branches