[gnome-settings-daemon] power: Make idle-dim delay closer to idle-delay



commit 7bc750a5861fb72c1f24664b17f0cb0799077dc1
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jan 21 10:03:08 2013 +0100

    power: Make idle-dim delay closer to idle-delay
    
    idle_dim_delay = idle_delay * 4 / 5.
    
    Dimming on idle is a "warning" that the screen will soon blank,
    so make the value closer to the idle delay.

 plugins/power/gsd-power-constants.h |    4 ++--
 plugins/power/gsd-power-manager.c   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/power/gsd-power-constants.h b/plugins/power/gsd-power-constants.h
index 67998e3..8b02249 100644
--- a/plugins/power/gsd-power-constants.h
+++ b/plugins/power/gsd-power-constants.h
@@ -25,8 +25,8 @@
  * is set to "Never" */
 #define IDLE_DIM_BLANK_DISABLED_MIN                     60 /* seconds */
 
-/* How much smaller than idle-delay the dim delay is */
-#define IDLE_DELAY_TO_IDLE_DIM_FRACTION                  3
+/* Which fraction of the idle-delay is the idle-dim delay */
+#define IDLE_DELAY_TO_IDLE_DIM_MULTIPLIER                4/5
 
 /* The dim delay under which we do not bother dimming */
 #define MINIMUM_IDLE_DIM_DELAY                          10 /* seconds */
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index bcbabab..2b63ed9 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2672,7 +2672,7 @@ idle_configure (GsdPowerManager *manager)
                         if (timeout_dim == 0) {
                                 timeout_dim = IDLE_DIM_BLANK_DISABLED_MIN;
                         } else {
-                                timeout_dim /= IDLE_DELAY_TO_IDLE_DIM_FRACTION;
+                                timeout_dim *= IDLE_DELAY_TO_IDLE_DIM_MULTIPLIER;
                                 /* Don't bother dimming if the idle-delay is
                                  * too low, we'll do that when we bring down the
                                  * screen lock */



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