elm_map: block longpressed event when scrolled, zoomed, or rotated
Summary: Currently, longpressed event can be called when map is scrolled, zoomed or rotated. This might cause unintentional result, because mouse need to be down at lease once to execute scroll, zoom, or rotate, and longpressed event will start when those events takes long enough time. Reviewers: seoz, Hermet, woohyun, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3195 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
a3806857ca
commit
5bfa138bcc
|
@ -1289,6 +1289,7 @@ _scroll_cb(Evas_Object *obj,
|
||||||
else
|
else
|
||||||
eo_do(sd->obj, eo_event_callback_call
|
eo_do(sd->obj, eo_event_callback_call
|
||||||
(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_START, NULL));
|
(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_START, NULL));
|
||||||
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
||||||
sd->scr_timer = ecore_timer_add(0.25, _scr_timeout_cb, obj);
|
sd->scr_timer = ecore_timer_add(0.25, _scr_timeout_cb, obj);
|
||||||
eo_do(sd->obj, eo_event_callback_call
|
eo_do(sd->obj, eo_event_callback_call
|
||||||
(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL, NULL));
|
(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL, NULL));
|
||||||
|
@ -3295,6 +3296,7 @@ _pinch_zoom_start_cb(void *data,
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(data, EVAS_EVENT_FLAG_NONE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(data, EVAS_EVENT_FLAG_NONE);
|
||||||
|
|
||||||
sd->pinch_zoom = sd->zoom_detail;
|
sd->pinch_zoom = sd->zoom_detail;
|
||||||
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
||||||
|
|
||||||
return EVAS_EVENT_FLAG_NONE;
|
return EVAS_EVENT_FLAG_NONE;
|
||||||
}
|
}
|
||||||
|
@ -3338,6 +3340,7 @@ _pinch_rotate_cb(void *data,
|
||||||
|
|
||||||
evas_object_smart_changed(sd->pan_obj);
|
evas_object_smart_changed(sd->pan_obj);
|
||||||
}
|
}
|
||||||
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
||||||
|
|
||||||
return EVAS_EVENT_FLAG_NONE;
|
return EVAS_EVENT_FLAG_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue