summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-28 15:29:22 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-28 15:29:22 +0100
commitdb73bcabd92fd854908d49e54c1ff83159680687 (patch)
treede4d0a940ddb4412d3764775a291c80f3ec7d7df /src
parentf6e4be10057e4b80bc16d95feec5dd2c989d5a65 (diff)
e comp x - ensure animator works before fading in backlight
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_comp_x.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index a217a5eff..6beee467a 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -5272,13 +5272,25 @@ _e_comp_x_screensaver_off()
5272} 5272}
5273 5273
5274static Ecore_Timer *screensaver_eval_timer = NULL; 5274static Ecore_Timer *screensaver_eval_timer = NULL;
5275static Ecore_Animator *screensaver_eval_animator = NULL;
5275static Eina_Bool saver_on = EINA_FALSE; 5276static Eina_Bool saver_on = EINA_FALSE;
5276 5277
5277static Eina_Bool 5278static Eina_Bool
5278_e_comp_x_screensaver_eval_cb(void *d EINA_UNUSED) 5279_e_comp_x_screensaver_eval_cb(void *d EINA_UNUSED)
5279{ 5280{
5280 e_screensaver_eval(saver_on); 5281 E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
5281 screensaver_eval_timer = NULL; 5282 screensaver_eval_timer = NULL;
5283 e_screensaver_eval(saver_on);
5284 return EINA_FALSE;
5285}
5286
5287static Eina_Bool
5288_e_comp_x_screensaver_pre_eval_cb(void *d EINA_UNUSED)
5289{
5290 E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
5291 screensaver_eval_animator = NULL;
5292 screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL);
5293 e_screensaver_eval(saver_on);
5282 return EINA_FALSE; 5294 return EINA_FALSE;
5283} 5295}
5284 5296
@@ -5290,13 +5302,15 @@ _e_comp_x_screensaver_notify_cb(void *data EINA_UNUSED, int type EINA_UNUSED, Ec
5290 { 5302 {
5291 saver_on = EINA_TRUE; 5303 saver_on = EINA_TRUE;
5292 E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del); 5304 E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
5305 E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
5293 screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL); 5306 screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL);
5294 } 5307 }
5295 else if ((!ev->on) && (saver_on)) 5308 else if ((!ev->on) && (saver_on))
5296 { 5309 {
5297 saver_on = EINA_FALSE; 5310 saver_on = EINA_FALSE;
5298 E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del); 5311 E_FREE_FUNC(screensaver_eval_timer, ecore_timer_del);
5299 screensaver_eval_timer = ecore_timer_loop_add(0.3, _e_comp_x_screensaver_eval_cb, NULL); 5312 E_FREE_FUNC(screensaver_eval_animator, ecore_animator_del);
5313 screensaver_eval_animator = ecore_animator_add(_e_comp_x_screensaver_pre_eval_cb, NULL);
5300 } 5314 }
5301 return ECORE_CALLBACK_PASS_ON; 5315 return ECORE_CALLBACK_PASS_ON;
5302} 5316}