ecore-drm: Send touch_motion event when touch_down event is triggered. 25/38525/2 accepted/tizen/common/20150422.080236 accepted/tizen/mobile/20150422.103622 accepted/tizen/tv/20150422.102221 accepted/tizen/wearable/20150422.102934 submit/tizen/20150421.060037
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 21 Apr 2015 14:48:45 +0000 (23:48 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 21 Apr 2015 15:03:01 +0000 (08:03 -0700)
Change-Id: Ie80fd0852985e3f43d55b17e104e15c029d182b0

src/lib/ecore_drm/ecore_drm_evdev.c

index fbc5959..5e6dd82 100644 (file)
@@ -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)
 {