}
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))))
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);
}
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;
/* 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;
}
}