mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 23:40:08 +01:00
Make weston_output_transform_coordinate() take wl_fixed_t coordinates
This is to make it possible for future API to have non-integer coordinates as input. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
077e0c937a
commit
098ca89e17
1 changed files with 12 additions and 8 deletions
20
src/evdev.c
20
src/evdev.c
|
|
@ -103,18 +103,18 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
|
|||
device->rel.dy = 0;
|
||||
goto handled;
|
||||
case EVDEV_ABSOLUTE_MT_DOWN:
|
||||
x = wl_fixed_from_int(device->mt.slots[slot].x);
|
||||
y = wl_fixed_from_int(device->mt.slots[slot].y);
|
||||
weston_output_transform_coordinate(device->output,
|
||||
device->mt.slots[slot].x,
|
||||
device->mt.slots[slot].y,
|
||||
&x, &y);
|
||||
x, y, &x, &y);
|
||||
notify_touch(master, time,
|
||||
slot, x, y, WL_TOUCH_DOWN);
|
||||
goto handled;
|
||||
case EVDEV_ABSOLUTE_MT_MOTION:
|
||||
x = wl_fixed_from_int(device->mt.slots[slot].x);
|
||||
y = wl_fixed_from_int(device->mt.slots[slot].y);
|
||||
weston_output_transform_coordinate(device->output,
|
||||
device->mt.slots[slot].x,
|
||||
device->mt.slots[slot].y,
|
||||
&x, &y);
|
||||
x, y, &x, &y);
|
||||
notify_touch(master, time,
|
||||
slot, x, y, WL_TOUCH_MOTION);
|
||||
goto handled;
|
||||
|
|
@ -124,14 +124,18 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
|
|||
goto handled;
|
||||
case EVDEV_ABSOLUTE_TOUCH_DOWN:
|
||||
transform_absolute(device, &cx, &cy);
|
||||
x = wl_fixed_from_int(cx);
|
||||
y = wl_fixed_from_int(cy);
|
||||
weston_output_transform_coordinate(device->output,
|
||||
cx, cy, &x, &y);
|
||||
x, y, &x, &y);
|
||||
notify_touch(master, time, 0, x, y, WL_TOUCH_DOWN);
|
||||
goto handled;
|
||||
case EVDEV_ABSOLUTE_MOTION:
|
||||
transform_absolute(device, &cx, &cy);
|
||||
x = wl_fixed_from_int(cx);
|
||||
y = wl_fixed_from_int(cy);
|
||||
weston_output_transform_coordinate(device->output,
|
||||
cx, cy, &x, &y);
|
||||
x, y, &x, &y);
|
||||
|
||||
if (device->caps & EVDEV_TOUCH)
|
||||
notify_touch(master, time, 0, x, y, WL_TOUCH_MOTION);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue