Fix wrong down coordinate of 2nd finger 33/109033/3 accepted/tizen/3.0/common/20170116.122414 accepted/tizen/3.0/mobile/20170113.235917 accepted/tizen/3.0/wearable/20170114.000058 submit/tizen_3.0/20170113.095020
authorPrasoon Singh <prasoon.16@samsung.com>
Fri, 6 Jan 2017 13:23:33 +0000 (18:53 +0530)
committerShinwoo Kim <cinoo.kim@samsung.com>
Mon, 9 Jan 2017 10:47:48 +0000 (19:47 +0900)
The 2nd finger coordinate was same with 1st finger coordinate.

Change-Id: I2b896f50f2b723b8f25a33bdbd9c1453e1eb0e99

src/e_screen_reader_gestures.c

index 6d912ac..3a10796 100644 (file)
@@ -587,7 +587,7 @@ static Eina_Bool _flick_to_scroll_gesture_conditions_met(Ecore_Event_Mouse_Move
 }
 
 static void
-start_scroll(int x, int y, Cover *cov)
+start_scroll(Cover *cov)
 {
    Ecore_Event_Mouse_Button *ev_down;
    if (!(ev_down = malloc(sizeof(Ecore_Event_Mouse_Button))))
@@ -596,15 +596,18 @@ start_scroll(int x, int y, Cover *cov)
         return ;
      }
    memcpy(ev_down, cov->flick_gesture.ev_first_down, sizeof(Ecore_Event_Mouse_Button));
-   cov->flick_gesture.ev_first_down->x = x;
-   cov->flick_gesture.ev_first_down->y = y;
-   _emit_mouse_move_event(cov->flick_gesture.ev_first_down);
+   cov->flick_gesture.ev_first_down->x = cov->hover_gesture.x[0];
+   cov->flick_gesture.ev_first_down->y = cov->hover_gesture.y[0];
    cov->flick_gesture.ev_first_down->timestamp = (int)(ecore_time_get() * 1000);
    cov->flick_gesture.ev_first_down->multi.radius += MAGIC_NUMBER;
+   _emit_mouse_move_event(cov->flick_gesture.ev_first_down);
    ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, cov->flick_gesture.ev_first_down, NULL, NULL);
-   _emit_mouse_move_event(ev_down);
+
+   ev_down->x = cov->hover_gesture.x[1];
+   ev_down->y = cov->hover_gesture.y[1];
    ev_down->multi.device = 1;
    ev_down->multi.radius += MAGIC_NUMBER;
+   _emit_mouse_move_event(ev_down);
    ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev_down, NULL, NULL);
 }
 
@@ -649,7 +652,7 @@ _flick_gesture_mouse_move(Ecore_Event_Mouse_Move *ev, Cover *cov)
          if (i == 1 && cov->n_taps == 2) {
             if ((cov->flick_gesture.flick_to_scroll || _flick_to_scroll_gesture_conditions_met(ev, cov->flick_gesture.timestamp[i], dx, dy)) && scrolling) {
                if (!cov->flick_gesture.flick_to_scroll) {
-                  start_scroll(ev->x, ev->y, cov);
+                  start_scroll(cov);
                   cov->flick_gesture.flick_to_scroll = EINA_TRUE;
                }
                return;
@@ -818,7 +821,7 @@ _hover_gesture_mouse_down(Ecore_Event_Mouse_Button *ev, Cover *cov)
 
                /* start_scroll is necessary for mouse down event */
                if (!cov->flick_gesture.flick_to_scroll) {
-                  start_scroll(ev->x, ev->y, cov);
+                  start_scroll(cov);
                   cov->flick_gesture.flick_to_scroll = EINA_TRUE;
                }
           }