From 55744f65448397f53777d7bfdb18fde022bc96a6 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 4 Oct 2013 11:05:27 +0200 Subject: [PATCH] wacom: Fix device filtering in calibration UI We receive ClutterEvents, not GdkEvents for button presses on ClutterActors, so use the correct functions to filter devices. This also fixes the offset used to access the coordinates of the events. We were actually using the pointer to the source and x struct members instead of x and y. https://bugzilla.gnome.org/show_bug.cgi?id=707784 --- panels/wacom/calibrator/calibrator-gui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/wacom/calibrator/calibrator-gui.c b/panels/wacom/calibrator/calibrator-gui.c index eab8ef21e..2635a2e9f 100644 --- a/panels/wacom/calibrator/calibrator-gui.c +++ b/panels/wacom/calibrator/calibrator-gui.c @@ -304,10 +304,10 @@ on_button_press_event(ClutterActor *actor, /* Check matching device ID if a device ID was provided */ if (area->device_id > -1) { - GdkDevice *device; + ClutterInputDevice *device; - device = gdk_event_get_source_device ((GdkEvent *) event); - if (device != NULL && gdk_x11_device_get_id (device) != area->device_id) + device = ((ClutterButtonEvent *) event)->device; + if (device != NULL && clutter_input_device_get_device_id (device) != area->device_id) return FALSE; }