From d5b7d947c3b3d9eeff4d36a7d2b772cedc0fab4a Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 27 Dec 2011 12:01:17 +0000 Subject: [PATCH] add feature to help fix bug in ecore-evas git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@66567 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 6 ++++++ src/lib/Evas.h | 10 ++++++++++ src/lib/canvas/evas_events.c | 15 +++++++++++++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 517906f..d95ab7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -590,3 +590,9 @@ 2011-12-26 Christopher Michael (devilhorns) * Add functions to get/set if an object is a 'frame_object' + +2011-12-27 Carsten Haitzler (The Rasterman) + + * Add feature to get number of pressed devices (help fix + ecore-evas bug). + diff --git a/src/lib/Evas.h b/src/lib/Evas.h index 0983e36..ae0584f 100644 --- a/src/lib/Evas.h +++ b/src/lib/Evas.h @@ -2511,6 +2511,16 @@ EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONN */ /** + * Get the number of mouse or multi presses currently active + * + * @p e The given canvas pointer. + * @return The numer of presses (0 if none active). + * + * @since 1.2 + */ +EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1); + +/** * Mouse down event feed. * * @param e The given canvas pointer. diff --git a/src/lib/canvas/evas_events.c b/src/lib/canvas/evas_events.c index c917673..eddd8f5 100644 --- a/src/lib/canvas/evas_events.c +++ b/src/lib/canvas/evas_events.c @@ -909,7 +909,7 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) _evas_walk(e); /* if our mouse button is grabbed to any objects */ - if (e->pointer.mouse_grabbed == 0) + if ((0) && (e->pointer.mouse_grabbed != 0)) { /* go thru old list of in objects */ Eina_List *l, *copy; @@ -929,12 +929,14 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } + obj->mouse_grabbed = 0; } if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); + e->pointer.mouse_grabbed = 0; _evas_post_event_callback_call(e); } _evas_unwalk(e); @@ -1115,7 +1117,7 @@ evas_event_feed_multi_move(Evas *e, if (e->events_frozen > 0) return; e->last_timestamp = timestamp; - if (!e->pointer.inside) return; + if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; _evas_walk(e); /* update moved touch point */ @@ -1674,3 +1676,12 @@ evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type break; } } + +EAPI int +evas_event_down_count_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->pointer.downs; +} -- 2.7.4