Commit 7bc750a5 authored by Bastien Nocera's avatar Bastien Nocera

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.
parent c26ab48c
......@@ -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 */
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment