From: Kristian Høgsberg Date: Wed, 9 May 2012 16:19:04 +0000 (-0400) Subject: compositor: Use wl_fixed_t for incoming input events X-Git-Tag: 0.1.0~163^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ffaf3d79bddab73bd001ee6e27bbbebadd4c9b5;p=platform%2Fupstream%2Flibinput.git compositor: Use wl_fixed_t for incoming input events This changes notify_motion, notify_pointer_focus and notify_touch to take wl_fixed_t types for input coordinates. --- diff --git a/src/evdev.c b/src/evdev.c index 5fa7ae6..4dbf575 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -300,8 +300,8 @@ evdev_flush_motion(struct evdev_input_device *device, uint32_t time) if (device->type & EVDEV_RELATIVE_MOTION) { notify_motion(master, time, - wl_fixed_to_int(master->x) + device->rel.dx, - wl_fixed_to_int(master->y) + device->rel.dy); + master->x + wl_fixed_from_int(device->rel.dx), + master->y + wl_fixed_from_int(device->rel.dy)); device->type &= ~EVDEV_RELATIVE_MOTION; device->rel.dx = 0; device->rel.dy = 0; @@ -309,8 +309,8 @@ evdev_flush_motion(struct evdev_input_device *device, uint32_t time) if (device->type & EVDEV_ABSOLUTE_MT_DOWN) { notify_touch(master, time, device->mt.slot, - device->mt.x[device->mt.slot], - device->mt.y[device->mt.slot], + wl_fixed_from_int(device->mt.x[device->mt.slot]), + wl_fixed_from_int(device->mt.y[device->mt.slot]), WL_INPUT_DEVICE_TOUCH_DOWN); device->type &= ~EVDEV_ABSOLUTE_MT_DOWN; device->type &= ~EVDEV_ABSOLUTE_MT_MOTION; @@ -318,8 +318,8 @@ evdev_flush_motion(struct evdev_input_device *device, uint32_t time) if (device->type & EVDEV_ABSOLUTE_MT_MOTION) { notify_touch(master, time, device->mt.slot, - device->mt.x[device->mt.slot], - device->mt.y[device->mt.slot], + wl_fixed_from_int(device->mt.x[device->mt.slot]), + wl_fixed_from_int(device->mt.y[device->mt.slot]), WL_INPUT_DEVICE_TOUCH_MOTION); device->type &= ~EVDEV_ABSOLUTE_MT_DOWN; device->type &= ~EVDEV_ABSOLUTE_MT_MOTION; @@ -330,7 +330,9 @@ evdev_flush_motion(struct evdev_input_device *device, uint32_t time) device->type &= ~EVDEV_ABSOLUTE_MT_UP; } if (device->type & EVDEV_ABSOLUTE_MOTION) { - notify_motion(master, time, device->abs.x, device->abs.y); + notify_motion(master, time, + wl_fixed_from_int(device->abs.x), + wl_fixed_from_int(device->abs.y)); device->type &= ~EVDEV_ABSOLUTE_MOTION; } }