[gnome-control-center] wacom: Fix event filtering in the calibrator



commit c9864b1ebcfcfdca3909bf89feaf226e4187f0a5
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 8 11:31:34 2013 +0200

    wacom: Fix event filtering in the calibrator
    
    We were always getting the events from the core pointer instead
    of the device itself, so threw all of them away.
    We need to get the real source device from the event.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707784

 panels/wacom/calibrator/calibrator-gui.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/panels/wacom/calibrator/calibrator-gui.c b/panels/wacom/calibrator/calibrator-gui.c
index 2635a2e..255d571 100644
--- a/panels/wacom/calibrator/calibrator-gui.c
+++ b/panels/wacom/calibrator/calibrator-gui.c
@@ -306,9 +306,17 @@ on_button_press_event(ClutterActor       *actor,
     {
       ClutterInputDevice *device;
 
-      device =  ((ClutterButtonEvent *) event)->device;
-      if (device != NULL && clutter_input_device_get_device_id (device) != area->device_id)
+      device = clutter_event_get_source_device ((ClutterEvent *) event);
+      if (device != NULL && clutter_input_device_get_device_id (device) != area->device_id) {
+        char *name;
+
+        g_object_get (G_OBJECT (device), "name", &name, NULL);
+        g_debug ("Ignoring input from device %s (%d)",
+                 name,
+                 clutter_input_device_get_device_id (device));
+        g_free (name);
         return FALSE;
+      }
     }
 
   /* Handle click */


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