okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=f56a228e701eddf04f1bceba052cec83d5cd85c8

commit f56a228e701eddf04f1bceba052cec83d5cd85c8
Author: Stephen Houston <[email protected]>
Date:   Wed Oct 24 15:19:47 2018 -0500

    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.
---
 src/bin/e_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
 
         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);
           }

-- 


Reply via email to