From 00cbc7a9e6fbfcaa93da40637d2d37756de3ceb2 Mon Sep 17 00:00:00 2001 From: raster Date: Sun, 21 Nov 2010 06:28:13 +0000 Subject: [PATCH] fix clicked when on hold set. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@54757 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_callbacks.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/lib/edje_callbacks.c b/src/lib/edje_callbacks.c index 4966688..04d70cc 100644 --- a/src/lib/edje_callbacks.c +++ b/src/lib/edje_callbacks.c @@ -194,7 +194,8 @@ _edje_mouse_down_signal_cb(void *data, Evas *e, Evas_Object *obj, void *event_in if (rp->clicked_button == 0) { rp->clicked_button = ev->button; - rp->still_in = 1; + if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) + rp->still_in = 1; } // _edje_recalc_do(ed); _edje_thaw(ed); @@ -293,21 +294,30 @@ _edje_mouse_move_signal_cb(void *data, Evas *e, Evas_Object *obj, void *event_in if (rp->still_in) { - Evas_Coord x, y, w, h; - evas_object_geometry_get(obj, &x, &y, &w, &h); - if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) || - (ev->cur.canvas.x >= (x + w)) || (ev->cur.canvas.y >= (y + h))) - rp->still_in = 0; + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) + rp->still_in = 0; + else + { + Evas_Coord x, y, w, h; + + evas_object_geometry_get(obj, &x, &y, &w, &h); + if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) || + (ev->cur.canvas.x >= (x + w)) || (ev->cur.canvas.y >= (y + h))) + rp->still_in = 0; + } } else { - Evas_Coord x, y, w, h; - - evas_object_geometry_get(obj, &x, &y, &w, &h); - if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) && - (ev->cur.canvas.x < (x + w)) && (ev->cur.canvas.y < (y + h))) - rp->still_in = 1; + if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) + { + Evas_Coord x, y, w, h; + + evas_object_geometry_get(obj, &x, &y, &w, &h); + if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) && + (ev->cur.canvas.x < (x + w)) && (ev->cur.canvas.y < (y + h))) + rp->still_in = 1; + } } _edje_freeze(ed); if (rp->drag) -- 2.7.4