[clutter/wip/evdev-tablet-support: 28/35] evdev: Pass axis parameters when notifying absolute motion events



commit 23156c8961e44db25bc03ebacea68a1a69802c8b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jan 9 17:10:11 2015 +0100

    evdev: Pass axis parameters when notifying absolute motion events
    
    This will be useful for tablet support, NULL is given in the current
    callers.

 clutter/evdev/clutter-device-manager-evdev.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index f88612f..2f53ea0 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -348,7 +348,8 @@ static void
 notify_absolute_motion (ClutterInputDevice *input_device,
                        guint32             time_,
                        gfloat              x,
-                       gfloat              y)
+                       gfloat              y,
+                       gdouble            *axes)
 {
   gfloat stage_width, stage_height;
   ClutterDeviceManagerEvdev *manager_evdev;
@@ -390,6 +391,7 @@ notify_absolute_motion (ClutterInputDevice *input_device,
   _clutter_xkb_translate_state (event, seat->xkb, seat->button_state);
   event->motion.x = x;
   event->motion.y = y;
+  event->motion.axes = axes;
   clutter_event_set_device (event, seat->core_pointer);
   clutter_event_set_source_device (event, input_device);
 
@@ -421,7 +423,7 @@ notify_relative_motion (ClutterInputDevice *input_device,
   new_x = point.x + dx;
   new_y = point.y + dy;
 
-  notify_absolute_motion (input_device, time_, new_x, new_y);
+  notify_absolute_motion (input_device, time_, new_x, new_y, NULL);
 }
 
 static void
@@ -1178,7 +1180,7 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
                                                                stage_width);
         y = libinput_event_pointer_get_absolute_y_transformed (motion_event,
                                                                stage_height);
-        notify_absolute_motion (device, time, x, y);
+        notify_absolute_motion (device, time, x, y, NULL);
 
         break;
       }
@@ -2114,5 +2116,5 @@ clutter_evdev_warp_pointer (ClutterInputDevice   *pointer_device,
                             int                   x,
                             int                   y)
 {
-  notify_absolute_motion (pointer_device, time_, x, y);
+  notify_absolute_motion (pointer_device, time_, x, y, NULL);
 }


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