forked from enlightenment/enlightenment
Gadget Menu: Cancel menu after a drag *EITHER* vertically or horizontally, not *BOTH*. Fixes longpress menu interrupting drag in gadgets such as pager.
The longpress menu was only getting cancelled if a drag occured at a distance of least 25 pixels. This is due to the code checking for horizontal drag distance + vertical drag distance >= 25. I believe the intent here was to cancel drag if >= 5 vertically or >= 5 horizontally, not both. Most drags wouldn't be 25 pixels in a single gadget such as pager, and a 25 pixel drag would not happen quick enough to offset longpress. This commit also lowers the drag cancelling threshold to 3 pixels, not 5.
This commit is contained in:
parent
3e4a34d03c
commit
f56a228e70
|
@ -1488,7 +1488,7 @@ _site_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
|
||||
dx = ev->cur.canvas.x - zgs->down_1_x;
|
||||
dy = ev->cur.canvas.y - zgs->down_1_y;
|
||||
if (((dx * dx) + (dy * dy)) >= (5 * 5))
|
||||
if (((dx * dx) >= 3) || ((dy * dy) >= 3))
|
||||
{
|
||||
E_FREE_FUNC(zgs->down_timer, ecore_timer_del);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue