summaryrefslogtreecommitdiff
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
commit34e4aff4eab4957bdb76396158e40ebc6347a75d (patch)
tree1d0942105bf13f776275ec0eb1362a052ad70216
parent4af0e4da4d6c8347a9b4787e5b22f746080bef3d (diff)
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.
-rw-r--r--src/lib/elm_win.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 4a84e3851..10b4d2e9e 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -286,7 +286,7 @@ static int _elm_win_count = 0;
286 286
287static Eina_Bool _elm_win_auto_throttled = EINA_FALSE; 287static Eina_Bool _elm_win_auto_throttled = EINA_FALSE;
288 288
289static Ecore_Job *_elm_win_state_eval_job = NULL; 289static Ecore_Timer *_elm_win_state_eval_timer = NULL;
290 290
291static void 291static void
292_elm_win_on_resize_obj_changed_size_hints(void *data, 292_elm_win_on_resize_obj_changed_size_hints(void *data,
@@ -395,7 +395,7 @@ _elm_win_apply_alpha(Eo *obj, Elm_Win_Data *sd)
395 } 395 }
396} 396}
397 397
398static void 398static Eina_Bool
399_elm_win_state_eval(void *data EINA_UNUSED) 399_elm_win_state_eval(void *data EINA_UNUSED)
400{ 400{
401 Eina_List *l; 401 Eina_List *l;
@@ -405,11 +405,11 @@ _elm_win_state_eval(void *data EINA_UNUSED)
405 int _elm_win_count_withdrawn = 0; 405 int _elm_win_count_withdrawn = 0;
406 Eina_Bool throttle = EINA_FALSE; 406 Eina_Bool throttle = EINA_FALSE;
407 407
408 _elm_win_state_eval_job = NULL; 408 _elm_win_state_eval_timer = NULL;
409 409
410 if (_elm_config->auto_norender_withdrawn) 410 EINA_LIST_FOREACH(_elm_win_list, l, obj)
411 { 411 {
412 EINA_LIST_FOREACH(_elm_win_list, l, obj) 412 if (_elm_config->auto_norender_withdrawn)
413 { 413 {
414 if ((elm_win_withdrawn_get(obj)) || 414 if ((elm_win_withdrawn_get(obj)) ||
415 ((elm_win_iconified_get(obj) && 415 ((elm_win_iconified_get(obj) &&
@@ -444,6 +444,14 @@ _elm_win_state_eval(void *data EINA_UNUSED)
444 } 444 }
445 } 445 }
446 } 446 }
447 else
448 {
449 if (evas_object_data_get(obj, "__win_auto_norender"))
450 {
451 elm_win_norender_pop(obj);
452 evas_object_data_del(obj, "__win_auto_norender");
453 }
454 }
447 } 455 }
448 if (((_elm_config->auto_throttle) && 456 if (((_elm_config->auto_throttle) &&
449 (elm_policy_get(ELM_POLICY_THROTTLE) != ELM_POLICY_THROTTLE_NEVER)) || 457 (elm_policy_get(ELM_POLICY_THROTTLE) != ELM_POLICY_THROTTLE_NEVER)) ||
@@ -492,13 +500,14 @@ _elm_win_state_eval(void *data EINA_UNUSED)
492 } 500 }
493 } 501 }
494 _win_noblank_eval(); 502 _win_noblank_eval();
503 return EINA_FALSE;
495} 504}
496 505
497static void 506static void
498_elm_win_state_eval_queue(void) 507_elm_win_state_eval_queue(void)
499{ 508{
500 ecore_job_del(_elm_win_state_eval_job); 509 if (_elm_win_state_eval_timer) ecore_timer_del(_elm_win_state_eval_timer);
501 _elm_win_state_eval_job = ecore_job_add(_elm_win_state_eval, NULL); 510 _elm_win_state_eval_timer = ecore_timer_add(0.5, _elm_win_state_eval, NULL);
502} 511}
503 512
504// example shot spec (wait 0.1 sec then save as my-window.png): 513// example shot spec (wait 0.1 sec then save as my-window.png):
@@ -2262,7 +2271,7 @@ _elm_win_shutdown(void)
2262 _elm_win_list = eina_list_remove_list(_elm_win_list, _elm_win_list); 2271 _elm_win_list = eina_list_remove_list(_elm_win_list, _elm_win_list);
2263 } 2272 }
2264 } 2273 }
2265 ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del); 2274 ELM_SAFE_FREE(_elm_win_state_eval_timer, ecore_timer_del);
2266} 2275}
2267 2276
2268void 2277void