[gnome-control-center] wacom: Fix device filtering in calibration UI



commit 55744f65448397f53777d7bfdb18fde022bc96a6
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 4 11:05:27 2013 +0200

    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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/wacom/calibrator/calibrator-gui.c b/panels/wacom/calibrator/calibrator-gui.c
index eab8ef2..2635a2e 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;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]