summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2009-08-18 18:05:45 +0200
committerMatthias Hopf <mhopf@suse.de>2009-09-03 16:14:56 +0200
commitc18fc7955dc2aec878dd3bea1d51aaecf3f08858 (patch)
tree258c17391a94f8232992c921b6d697754cf90235 /src/drmmode_display.c
parentfe7693c94a396b9d17bb66a000178750a432ce3a (diff)
Don't ignore backlight level change to the same level.
If set externally to a different level, this would result in a no-op. OTOH if the display is switched off (DPMS) you do not want the change to take place immediately, but rather to be saved and set later when the display is active again.
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 24c76591..47dfc6a8 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1084,10 +1084,9 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
if (val < 0 || val > drmmode_output->backlight_max)
return FALSE;
- if (val != drmmode_output->backlight_active_level) {
+ if (drmmode_output->dpms_mode == DPMSModeOn)
drmmode_backlight_set(output, val);
- drmmode_output->backlight_active_level = val;
- }
+ drmmode_output->backlight_active_level = val;
return TRUE;
}