diff options
-rw-r--r-- | plugins/color/gsd-night-light.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/color/gsd-night-light.c b/plugins/color/gsd-night-light.c index 635f1608..f0eb2d5c 100644 --- a/plugins/color/gsd-night-light.c +++ b/plugins/color/gsd-night-light.c @@ -322,11 +322,6 @@ night_light_recheck (GsdNightLight *self) self->disabled_until_tmw = FALSE; g_clear_pointer(&self->disabled_until_tmw_dt, g_date_time_unref); g_object_notify (G_OBJECT (self), "disabled-until-tmw"); - } else { - g_debug ("night light still day-disabled, resetting"); - gsd_night_light_set_temperature (self, - GSD_COLOR_TEMPERATURE_DEFAULT); - return; } } @@ -343,6 +338,14 @@ night_light_recheck (GsdNightLight *self) return; } + gsd_night_light_set_active (self, TRUE); + + if (self->disabled_until_tmw) { + g_debug ("night light still day-disabled"); + gsd_night_light_set_temperature (self, GSD_COLOR_TEMPERATURE_DEFAULT); + return; + } + /* smear the temperature for a short duration before the set limits * * |----------------------| = from->to @@ -372,9 +375,9 @@ night_light_recheck (GsdNightLight *self) } else { temp_smeared = temperature; } + g_debug ("night light mode on, using temperature of %uK (aiming for %uK)", temp_smeared, temperature); - gsd_night_light_set_active (self, TRUE); gsd_night_light_set_temperature (self, temp_smeared); } |