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



commit c63bc4c02a343fa3c8a8b2cb34b53beb72d30252
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 523b538..f18cb32 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -351,7 +351,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;
@@ -393,6 +394,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);
 
@@ -425,7 +427,7 @@ notify_relative_motion (ClutterInputDevice *input_device,
   new_x = seat->pointer_x + dx;
   new_y = seat->pointer_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
@@ -1182,7 +1184,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;
       }
@@ -2118,5 +2120,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]