Eina_Bool double_tap;
Ecore_Event_Mouse_Button *ev_down, *ev_multi_down;
Eina_Bool drag_start;
- int drag_finger[2];
int drag_x_delta;
int drag_y_delta;
} tap_n_hold_gesture_data;
}
_emit_mouse_move_event(cov->tap_n_hold_gesture_data.ev_down);
cov->tap_n_hold_gesture_data.ev_down->multi.radius += MAGIC_NUMBER;
- cov->tap_n_hold_gesture_data.drag_finger[0] = cov->hover_gesture.finger[0];
- cov->tap_n_hold_gesture_data.drag_finger[1] = cov->hover_gesture.finger[1];
cov->tap_n_hold_gesture_data.drag_start = EINA_TRUE;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, cov->tap_n_hold_gesture_data.ev_down, NULL, NULL);
if (cov->tap_gesture_data.tap_type == TWO_FINGERS_GESTURE)
cov->tap_n_hold_gesture_data.n_taps = 1;
cov->tap_n_hold_gesture_data.double_tap = EINA_FALSE;
cov->tap_n_hold_gesture_data.drag_start = EINA_FALSE;
- cov->tap_n_hold_gesture_data.drag_finger[0] = -1;
- cov->tap_n_hold_gesture_data.drag_finger[1] = -1;
if (!(cov->tap_n_hold_gesture_data.ev_down = malloc(sizeof(Ecore_Event_Mouse_Button))))
{
DEBUG("NOT ENOUGH MEMORY");
_mouse_move(int type, Ecore_Event_Mouse_Move *event)
{
Ecore_Event_Mouse_Move *ev = event;
- // During draging ignore events from other fingers than the fingers that initiated the drag
- if (cover->tap_n_hold_gesture_data.drag_start &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[0] &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[1])
+ // During draging ignore events from other fingers than the finger that initiated the drag
+ if (cover->tap_n_hold_gesture_data.drag_start && ev->multi.device > 0)
{
return EINA_FALSE;
}
event->multi.radius -= MAGIC_NUMBER;
return EINA_TRUE;
}
- // During draging ignore events from other fingers than the fingers that initiated the drag
- if (cover->tap_n_hold_gesture_data.drag_start &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[0] &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[1])
+ // During draging ignore events from other fingers than the finger that initiated the drag
+ if (cover->tap_n_hold_gesture_data.drag_start && ev->multi.device > 0)
{
return EINA_FALSE;
}
ev_multi_up->multi.device = 1;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev_multi_up, NULL, NULL);
}
- cover->tap_n_hold_gesture_data.drag_finger[0] = -1;
- cover->tap_n_hold_gesture_data.drag_finger[1] = -1;
cover->tap_n_hold_gesture_data.drag_start = EINA_FALSE;
g_context->highlighted_object_x = -1;
g_context->highlighted_object_y = -1;
ev->multi.radius -= MAGIC_NUMBER;
return EINA_TRUE;
}
- // During draging ignore events from other fingers than the fingers that initiated the drag
- if (cover->tap_n_hold_gesture_data.drag_start &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[0] &&
- ev->multi.device != cover->tap_n_hold_gesture_data.drag_finger[1])
+ // During draging ignore events from other fingers than the finger that initiated the drag
+ if (cover->tap_n_hold_gesture_data.drag_start && ev->multi.device > 0)
{
return EINA_FALSE;
}