From 8ab2a67a740c9ead9c52a92790c4291c79ed0749 Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Tue, 21 Apr 2015 23:48:45 +0900 Subject: [PATCH] ecore-drm: Send touch_motion event when touch_down event is triggered. Change-Id: Ie80fd0852985e3f43d55b17e104e15c029d182b0 --- src/lib/ecore_drm/ecore_drm_evdev.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index fbc5959..5e6dd82 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c @@ -663,23 +663,6 @@ _device_handle_touch_event(Ecore_Drm_Evdev *edev, struct libinput_event_touch *e } static void -_device_handle_touch_down(struct libinput_device *device, struct libinput_event_touch *event) -{ - Ecore_Drm_Evdev *edev; - - if (!(edev = libinput_device_get_user_data(device))) return; - - edev->mouse.x = - libinput_event_touch_get_x_transformed(event, edev->output->current_mode->width); - edev->mouse.y = - libinput_event_touch_get_y_transformed(event, edev->output->current_mode->height); - - edev->mt_slot = libinput_event_touch_get_seat_slot(event); - - _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_DOWN); -} - -static void _device_handle_touch_motion(struct libinput_device *device, struct libinput_event_touch *event) { Ecore_Drm_Evdev *edev; @@ -729,6 +712,25 @@ _device_handle_touch_motion(struct libinput_device *device, struct libinput_even ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); } +static void +_device_handle_touch_down(struct libinput_device *device, struct libinput_event_touch *event) +{ + Ecore_Drm_Evdev *edev; + + if (!(edev = libinput_device_get_user_data(device))) return; + + edev->mouse.x = + libinput_event_touch_get_x_transformed(event, edev->output->current_mode->width); + edev->mouse.y = + libinput_event_touch_get_y_transformed(event, edev->output->current_mode->height); + + edev->mt_slot = libinput_event_touch_get_seat_slot(event); + + _device_handle_touch_motion(device, event); + + _device_handle_touch_event(edev, event, ECORE_EVENT_MOUSE_BUTTON_DOWN); +} + static void _device_handle_touch_up(struct libinput_device *device, struct libinput_event_touch *event) { -- 2.7.4