[gnome-settings-daemon/wip/hadess/force-screensaver-power-saver] power: Respect dim screen settings




commit eeb08097e9c0247e228c97287a99ca1771f5f177
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jul 29 12:05:40 2021 +0200

    power: Respect dim screen settings
    
    The dim screen settings in the UI was not well respected:
    - it only worked on discharging laptops
      (https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/837)
    - it was forced when battery was low when it might have been unwanted
      (https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/232)
    
    Respect the user preference and dim in all circumstances.

 plugins/power/gsd-power-manager.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index cf6f5a57..38c2be9f 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -1902,10 +1902,7 @@ idle_configure (GsdPowerManager *manager)
         timeout_dim = 0;
         if (manager->screensaver_active) {
                 /* Don't dim when the screen lock is active */
-        } else if (!on_battery) {
-                /* Don't dim when charging */
-        } else if (manager->battery_is_low ||
-                   manager->power_saver_enabled) {
+        } else if (manager->power_saver_enabled) {
                 /* Aggressively blank when battery is low */
                 timeout_dim = SCREENSAVER_TIMEOUT_BLANK;
         } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]