raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=f98a8e82d2fb4b9a5385dd0403b94e47587fe42a

commit f98a8e82d2fb4b9a5385dd0403b94e47587fe42a
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Apr 20 10:15:50 2021 +0100

    clock - save some power and send freeze to clock when screen is blanked
    
    don't tick quietly in the background when screen is off. no point
---
 src/modules/clock/e_mod_main.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c
index 0923423f5..a6a6bcc36 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -845,6 +845,15 @@ _clock_time_update(void *d EINA_UNUSED, int type 
EINA_UNUSED, void *event EINA_U
 static Eina_Bool
 _clock_screensaver_on()
 {
+   Eina_List *l;
+   Instance *inst;
+
+   EINA_LIST_FOREACH(clock_instances, l, inst)
+     {
+        edje_object_signal_emit(inst->o_clock, "e,state,freeze", "e");
+        if (inst->o_popclock)
+          edje_object_signal_emit(inst->o_popclock, "e,state,freeze", "e");
+     }
    E_FREE_FUNC(update_today, ecore_timer_del);
    return ECORE_CALLBACK_RENEW;
 }
@@ -852,6 +861,15 @@ _clock_screensaver_on()
 static Eina_Bool
 _clock_screensaver_off()
 {
+   Eina_List *l;
+   Instance *inst;
+
+   EINA_LIST_FOREACH(clock_instances, l, inst)
+     {
+        edje_object_signal_emit(inst->o_clock, "e,state,thaw", "e");
+        if (inst->o_popclock)
+          edje_object_signal_emit(inst->o_popclock, "e,state,thaw", "e");
+     }
    if (clock_instances) _update_today_timer(NULL);
    return ECORE_CALLBACK_RENEW;
 }

-- 


Reply via email to