diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/elementary/efl_ui_win.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 4dfbbe2d1c..0b24fa0d92 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c | |||
@@ -371,6 +371,7 @@ static int _elm_win_count = 0; | |||
371 | 371 | ||
372 | static Eina_Bool _elm_win_auto_throttled = EINA_FALSE; | 372 | static Eina_Bool _elm_win_auto_throttled = EINA_FALSE; |
373 | 373 | ||
374 | static Eina_Bool _elm_win_state_eval_timer_now = EINA_FALSE; | ||
374 | static Ecore_Timer *_elm_win_state_eval_timer = NULL; | 375 | static Ecore_Timer *_elm_win_state_eval_timer = NULL; |
375 | 376 | ||
376 | static void _elm_win_legacy_init(Efl_Ui_Win_Data *sd); | 377 | static void _elm_win_legacy_init(Efl_Ui_Win_Data *sd); |
@@ -658,6 +659,7 @@ _elm_win_state_eval(void *data EINA_UNUSED) | |||
658 | int _elm_win_count_withdrawn = 0; | 659 | int _elm_win_count_withdrawn = 0; |
659 | Eina_Bool throttle = EINA_FALSE; | 660 | Eina_Bool throttle = EINA_FALSE; |
660 | 661 | ||
662 | _elm_win_state_eval_timer_now = EINA_FALSE; | ||
661 | _elm_win_state_eval_timer = NULL; | 663 | _elm_win_state_eval_timer = NULL; |
662 | 664 | ||
663 | EINA_LIST_FOREACH(_elm_win_list, l, obj) | 665 | EINA_LIST_FOREACH(_elm_win_list, l, obj) |
@@ -674,7 +676,6 @@ _elm_win_state_eval(void *data EINA_UNUSED) | |||
674 | 676 | ||
675 | elm_win_norender_push(obj); | 677 | elm_win_norender_push(obj); |
676 | evas_object_data_set(obj, "__win_auto_norender", obj); | 678 | evas_object_data_set(obj, "__win_auto_norender", obj); |
677 | |||
678 | if (_elm_config->auto_flush_withdrawn) | 679 | if (_elm_config->auto_flush_withdrawn) |
679 | { | 680 | { |
680 | edje_file_cache_flush(); | 681 | edje_file_cache_flush(); |
@@ -779,10 +780,15 @@ _elm_win_flush_cache_and_exit(Eo *obj) | |||
779 | } | 780 | } |
780 | 781 | ||
781 | static void | 782 | static void |
782 | _elm_win_state_eval_queue(void) | 783 | _elm_win_state_eval_queue(Eina_Bool now) |
783 | { | 784 | { |
785 | if ((_elm_win_state_eval_timer_now) && (_elm_win_state_eval_timer)) return; | ||
784 | if (_elm_win_state_eval_timer) ecore_timer_del(_elm_win_state_eval_timer); | 786 | if (_elm_win_state_eval_timer) ecore_timer_del(_elm_win_state_eval_timer); |
785 | _elm_win_state_eval_timer = ecore_timer_add(0.5, _elm_win_state_eval, NULL); | 787 | if (now) |
788 | _elm_win_state_eval_timer = ecore_timer_add(0.0, _elm_win_state_eval, NULL); | ||
789 | else | ||
790 | _elm_win_state_eval_timer = ecore_timer_add(0.5, _elm_win_state_eval, NULL); | ||
791 | _elm_win_state_eval_timer_now = now; | ||
786 | } | 792 | } |
787 | 793 | ||
788 | // example shot spec (wait 0.1 sec then save as my-window.png): | 794 | // example shot spec (wait 0.1 sec then save as my-window.png): |
@@ -1850,7 +1856,7 @@ _elm_win_state_change(Ecore_Evas *ee) | |||
1850 | } | 1856 | } |
1851 | } | 1857 | } |
1852 | 1858 | ||
1853 | _elm_win_state_eval_queue(); | 1859 | _elm_win_state_eval_queue(EINA_TRUE); |
1854 | 1860 | ||
1855 | if ((ch_withdrawn) || (ch_minimized)) | 1861 | if ((ch_withdrawn) || (ch_minimized)) |
1856 | { | 1862 | { |
@@ -2618,7 +2624,7 @@ _efl_ui_win_hide(Eo *obj, Efl_Ui_Win_Data *sd) | |||
2618 | return; | 2624 | return; |
2619 | } | 2625 | } |
2620 | 2626 | ||
2621 | _elm_win_state_eval_queue(); | 2627 | _elm_win_state_eval_queue(EINA_FALSE); |
2622 | 2628 | ||
2623 | if ((sd->modal) && (evas_object_visible_get(obj))) | 2629 | if ((sd->modal) && (evas_object_visible_get(obj))) |
2624 | _elm_win_modality_decrement(sd); | 2630 | _elm_win_modality_decrement(sd); |
@@ -3113,7 +3119,7 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd) | |||
3113 | 3119 | ||
3114 | _elm_win_list = eina_list_remove(_elm_win_list, obj); | 3120 | _elm_win_list = eina_list_remove(_elm_win_list, obj); |
3115 | _elm_win_count--; | 3121 | _elm_win_count--; |
3116 | _elm_win_state_eval_queue(); | 3122 | _elm_win_state_eval_queue(EINA_FALSE); |
3117 | 3123 | ||
3118 | if (_elm_win_count == _paused_windows) | 3124 | if (_elm_win_count == _paused_windows) |
3119 | efl_event_callback_call(efl_loop_get(obj), EFL_APP_EVENT_PAUSE, NULL); | 3125 | efl_event_callback_call(efl_loop_get(obj), EFL_APP_EVENT_PAUSE, NULL); |
@@ -5003,7 +5009,7 @@ _elm_win_cb_hide(void *data EINA_UNUSED, | |||
5003 | Evas_Object *obj EINA_UNUSED, | 5009 | Evas_Object *obj EINA_UNUSED, |
5004 | void *event_info EINA_UNUSED) | 5010 | void *event_info EINA_UNUSED) |
5005 | { | 5011 | { |
5006 | _elm_win_state_eval_queue(); | 5012 | _elm_win_state_eval_queue(EINA_FALSE); |
5007 | } | 5013 | } |
5008 | 5014 | ||
5009 | static void | 5015 | static void |
@@ -5012,7 +5018,7 @@ _elm_win_cb_show(void *data EINA_UNUSED, | |||
5012 | Evas_Object *obj EINA_UNUSED, | 5018 | Evas_Object *obj EINA_UNUSED, |
5013 | void *event_info EINA_UNUSED) | 5019 | void *event_info EINA_UNUSED) |
5014 | { | 5020 | { |
5015 | _elm_win_state_eval_queue(); | 5021 | _elm_win_state_eval_queue(EINA_TRUE); |
5016 | } | 5022 | } |
5017 | 5023 | ||
5018 | static inline Eina_Bool | 5024 | static inline Eina_Bool |