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




commit 81bd0cfef5b60db5bf7d3763b4a9655a6512f219
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 (#837)
    - it was forced when battery was low when it might have been
      unwanted (#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]