diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index 85a8c55500..825c84da89 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -366,3 +366,8 @@ * Fix Evas table to use actual fractional weights, not just boolean expand/not expand from weight value. +2011-05-27 Carsten Haitzler (The Rasterman) + + * Add evas_event_thaw_eval() for conveneince of evaluating in state + and callbacks of the pointer after a thaw is complete. + diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index 8e1ed5cd22..ccca5e6e78 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h @@ -1906,6 +1906,17 @@ EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONN */ EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +/** + * After thaw of a canvas, re-evaluate the state of objects and call callbacks + * + * @param e The canvas to evaluate after a thaw + * + * This is normally called after evas_event_thaw() to re-evaluate mouse + * containment and other states and thus also call callbacks for mouse in and + * out on new objects if the state change demands it. + */ +EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONNULL(1); + /** * @defgroup Evas_Event_Feeding_Group Event Feeding Functions * diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c index e4f9e91789..25e2f6b638 100644 --- a/legacy/evas/src/lib/canvas/evas_events.c +++ b/legacy/evas/src/lib/canvas/evas_events.c @@ -189,6 +189,16 @@ evas_event_freeze_get(const Evas *e) return e->events_frozen; } +EAPI void +evas_event_thaw_eval(Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + if (e->events_frozen != 0) return; + evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, + e->last_timestamp, NULL); +} EAPI void evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)