[clutter/wip/evdev-tablet-support: 2/6] evdev: Pass axis parameters when notifying absolute motion events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/evdev-tablet-support: 2/6] evdev: Pass axis parameters when notifying absolute motion events
- Date: Fri, 9 Jan 2015 16:41:19 +0000 (UTC)
commit 4909beef58ccf913f2a0776bd2174ab103828714
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 7b48481..cf4fd2a 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
@@ -1168,7 +1170,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;
}
@@ -2080,5 +2082,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]