summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Houston <smhouston88@gmail.com>2018-10-24 15:19:47 -0500
committerStephen Houston <smhouston88@gmail.com>2018-10-24 15:19:47 -0500
commitf56a228e701eddf04f1bceba052cec83d5cd85c8 (patch)
tree063ebe526891f986e553aa3f64c7313701f95dc6
parent3e4a34d03c1464b7d0cb431f6651e5460c2f08a3 (diff)
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.
-rw-r--r--src/bin/e_gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index e28e066f6..5e2325d04 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -1488,7 +1488,7 @@ _site_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
1488 1488
1489 dx = ev->cur.canvas.x - zgs->down_1_x; 1489 dx = ev->cur.canvas.x - zgs->down_1_x;
1490 dy = ev->cur.canvas.y - zgs->down_1_y; 1490 dy = ev->cur.canvas.y - zgs->down_1_y;
1491 if (((dx * dx) + (dy * dy)) >= (5 * 5)) 1491 if (((dx * dx) >= 3) || ((dy * dy) >= 3))
1492 { 1492 {
1493 E_FREE_FUNC(zgs->down_timer, ecore_timer_del); 1493 E_FREE_FUNC(zgs->down_timer, ecore_timer_del);
1494 } 1494 }