mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 02:38:06 +02:00
Store unaccelerated delta as normalized_coords
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
1df0208f4f
commit
b2b5913a35
1 changed files with 4 additions and 6 deletions
|
|
@ -94,10 +94,9 @@ struct libinput_event_pointer {
|
||||||
struct libinput_event base;
|
struct libinput_event base;
|
||||||
uint32_t time;
|
uint32_t time;
|
||||||
struct normalized_coords delta;
|
struct normalized_coords delta;
|
||||||
|
struct normalized_coords delta_unaccel;
|
||||||
struct device_coords absolute;
|
struct device_coords absolute;
|
||||||
struct discrete_coords discrete;
|
struct discrete_coords discrete;
|
||||||
double dx_unaccel;
|
|
||||||
double dy_unaccel;
|
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
uint32_t seat_button_count;
|
uint32_t seat_button_count;
|
||||||
enum libinput_button_state state;
|
enum libinput_button_state state;
|
||||||
|
|
@ -338,7 +337,7 @@ libinput_event_pointer_get_dx_unaccelerated(
|
||||||
0,
|
0,
|
||||||
LIBINPUT_EVENT_POINTER_MOTION);
|
LIBINPUT_EVENT_POINTER_MOTION);
|
||||||
|
|
||||||
return event->dx_unaccel;
|
return event->delta_unaccel.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBINPUT_EXPORT double
|
LIBINPUT_EXPORT double
|
||||||
|
|
@ -350,7 +349,7 @@ libinput_event_pointer_get_dy_unaccelerated(
|
||||||
0,
|
0,
|
||||||
LIBINPUT_EVENT_POINTER_MOTION);
|
LIBINPUT_EVENT_POINTER_MOTION);
|
||||||
|
|
||||||
return event->dy_unaccel;
|
return event->delta_unaccel.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBINPUT_EXPORT double
|
LIBINPUT_EXPORT double
|
||||||
|
|
@ -1108,8 +1107,7 @@ pointer_notify_motion(struct libinput_device *device,
|
||||||
*motion_event = (struct libinput_event_pointer) {
|
*motion_event = (struct libinput_event_pointer) {
|
||||||
.time = time,
|
.time = time,
|
||||||
.delta = *delta,
|
.delta = *delta,
|
||||||
.dx_unaccel = unaccel->x,
|
.delta_unaccel = *unaccel,
|
||||||
.dy_unaccel = unaccel->y,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
post_device_event(device, time,
|
post_device_event(device, time,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue