summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_events.c')
-rw-r--r--src/lib/evas/canvas/evas_events.c46
1 files changed, 35 insertions, 11 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 06d6923..2a7c017 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -3715,23 +3715,47 @@ _feed_mouse_move_eval_internal(Eo *eo_obj, Evas_Object_Protected_Data *obj)
3715 evas->last_timestamp, NULL); 3715 evas->last_timestamp, NULL);
3716 } 3716 }
3717} 3717}
3718EOLIAN void
3719_efl_canvas_object_efl_object_event_freeze(Eo *obj, Evas_Object_Protected_Data *pd)
3720{
3721 efl_event_freeze(efl_super(obj, EFL_CANVAS_OBJECT_CLASS));
3722 if (efl_event_freeze_count_get(obj) == 1)
3723 {
3724 pd->freeze_events = EINA_TRUE;
3725 evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE,
3726 EINA_FALSE);
3727 }
3728}
3718 3729
3719EOLIAN void 3730EOLIAN void
3720_efl_canvas_object_freeze_events_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool freeze) 3731_efl_canvas_object_efl_object_event_thaw(Eo *obj, Evas_Object_Protected_Data *pd)
3721{ 3732{
3722 freeze = !!freeze; 3733 if (efl_event_freeze_count_get(obj) == 1)
3723 if (obj->freeze_events == freeze) return; 3734 {
3724 obj->freeze_events = freeze; 3735 pd->freeze_events = EINA_FALSE;
3725 evas_object_smart_member_cache_invalidate(eo_obj, EINA_FALSE, EINA_TRUE, 3736 evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE,
3726 EINA_FALSE); 3737 EINA_FALSE);
3727 if (obj->freeze_events) return; 3738 _feed_mouse_move_eval_internal(obj, pd);
3728 _feed_mouse_move_eval_internal(eo_obj, obj); 3739 }
3740 efl_event_thaw(efl_super(obj, EFL_CANVAS_OBJECT_CLASS));
3729} 3741}
3730 3742
3731EOLIAN Eina_Bool 3743EAPI void
3732_efl_canvas_object_freeze_events_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) 3744evas_object_freeze_events_set(Eo *eo_obj, Eina_Bool freeze)
3745{
3746 if (freeze)
3747 efl_event_freeze(eo_obj);
3748 else
3749 // The following check is needed, as eo does not accept more thaw calls than freeze calls.
3750 // However, evas legacy stuff accepted multiple flase sets
3751 if (efl_event_freeze_count_get(eo_obj) > 0)
3752 efl_event_thaw(eo_obj);
3753}
3754
3755EAPI Eina_Bool
3756evas_object_freeze_events_get(const Eo *eo_obj EINA_UNUSED)
3733{ 3757{
3734 return obj->freeze_events; 3758 return (efl_event_freeze_count_get(eo_obj) > 0);
3735} 3759}
3736 3760
3737EOLIAN void 3761EOLIAN void