aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-28 12:27:59 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-28 12:27:59 +0900
commit3ad9ee1cc7c34eb813d8e79239815aa7cebd049f (patch)
treec793904412f3dbde049eadf4edb5123df859f3ee /legacy/elementary/src/lib/elm_win.c
parentpo/ko: Updated Korean translation. (diff)
downloadefl-3ad9ee1cc7c34eb813d8e79239815aa7cebd049f.tar.gz
elm = fix window norender handling
this delays norender and throttle handling to allow for quick show/hide etc. changes an app may make so to not jump state so often. this also fixes an issue wqhere config may change leaving all windows in norender mode.
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 4a84e38516..10b4d2e9e3 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -286,7 +286,7 @@ static int _elm_win_count = 0;
static Eina_Bool _elm_win_auto_throttled = EINA_FALSE;
-static Ecore_Job *_elm_win_state_eval_job = NULL;
+static Ecore_Timer *_elm_win_state_eval_timer = NULL;
static void
_elm_win_on_resize_obj_changed_size_hints(void *data,
@@ -395,7 +395,7 @@ _elm_win_apply_alpha(Eo *obj, Elm_Win_Data *sd)
}
}
-static void
+static Eina_Bool
_elm_win_state_eval(void *data EINA_UNUSED)
{
Eina_List *l;
@@ -405,11 +405,11 @@ _elm_win_state_eval(void *data EINA_UNUSED)
int _elm_win_count_withdrawn = 0;
Eina_Bool throttle = EINA_FALSE;
- _elm_win_state_eval_job = NULL;
+ _elm_win_state_eval_timer = NULL;
- if (_elm_config->auto_norender_withdrawn)
+ EINA_LIST_FOREACH(_elm_win_list, l, obj)
{
- EINA_LIST_FOREACH(_elm_win_list, l, obj)
+ if (_elm_config->auto_norender_withdrawn)
{
if ((elm_win_withdrawn_get(obj)) ||
((elm_win_iconified_get(obj) &&
@@ -444,6 +444,14 @@ _elm_win_state_eval(void *data EINA_UNUSED)
}
}
}
+ else
+ {
+ if (evas_object_data_get(obj, "__win_auto_norender"))
+ {
+ elm_win_norender_pop(obj);
+ evas_object_data_del(obj, "__win_auto_norender");
+ }
+ }
}
if (((_elm_config->auto_throttle) &&
(elm_policy_get(ELM_POLICY_THROTTLE) != ELM_POLICY_THROTTLE_NEVER)) ||
@@ -492,13 +500,14 @@ _elm_win_state_eval(void *data EINA_UNUSED)
}
}
_win_noblank_eval();
+ return EINA_FALSE;
}
static void
_elm_win_state_eval_queue(void)
{
- ecore_job_del(_elm_win_state_eval_job);
- _elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL);
+ if (_elm_win_state_eval_timer) ecore_timer_del(_elm_win_state_eval_timer);
+ _elm_win_state_eval_timer = ecore_timer_add(0.5, _elm_win_state_eval, NULL);
}
// example shot spec (wait 0.1 sec then save as my-window.png):
@@ -2262,7 +2271,7 @@ _elm_win_shutdown(void)
_elm_win_list = eina_list_remove_list(_elm_win_list, _elm_win_list);
}
}
- ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del);
+ ELM_SAFE_FREE(_elm_win_state_eval_timer, ecore_timer_del);
}
void