summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2017-01-18 16:14:00 +0000
committerGitHub <[email protected]>2017-01-18 16:14:00 +0000
commitdaca6b3ad85e8bc6814602f41cd15fea8cdad3e2 (patch)
tree9382f2fe3c964b030c80e11c2a55fb3c7f3f533d /src
parent8d90367814ea3ba75cc66746086b060bad40666d (diff)
parent8305f32f2a1be9f787a9610aa9272d7b9cbe9d65 (diff)
downloadmate-power-manager-daca6b3ad85e8bc6814602f41cd15fea8cdad3e2.tar.bz2
mate-power-manager-daca6b3ad85e8bc6814602f41cd15fea8cdad3e2.tar.xz
Merge pull request #153 from mpottage/master
Check both the "Backlight" and "BACKLIGHT" xrandr properties.
Diffstat (limited to 'src')
-rw-r--r--src/gpm-brightness.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gpm-brightness.c b/src/gpm-brightness.c
index 314403e..8987c7f 100644
--- a/src/gpm-brightness.c
+++ b/src/gpm-brightness.c
@@ -270,11 +270,15 @@ gpm_brightness_setup_display (GpmBrightness *brightness)
egg_debug ("RandR version %d.%d too old", major, minor);
return FALSE;
}
- /* can we support BACKLIGHT */
- brightness->priv->backlight = XInternAtom (brightness->priv->dpy, "BACKLIGHT", True);
+ /* Can we support "Backlight" */
+ brightness->priv->backlight = XInternAtom (brightness->priv->dpy, "Backlight", True);
if (brightness->priv->backlight == None) {
- egg_debug ("No outputs have backlight property");
- return FALSE;
+ /* Do we support "BACKLIGHT" (legacy) */
+ brightness->priv->backlight = XInternAtom (brightness->priv->dpy, "BACKLIGHT", True);
+ if (brightness->priv->backlight == None) {
+ egg_debug ("No outputs have backlight property");
+ return FALSE;
+ }
}
return TRUE;
}