summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-02-04 12:36:11 +0000
committerAdel Gadllah <adel.gadllah@gmail.com>2014-02-05 09:48:01 +0100
commitc2dadecab89ec4e261d6983d31aaabd81d0ca0a5 (patch)
tree02094b977b3daae6f323ff9a8b4a2b428eabae4d
parent099059c930e9520147b59a3fe40232e421818844 (diff)
xrandr: Use specified output property name for backlight control
Backlight controls are set using the "BACKLIGHT" XRANDR output property. This should be "Backlight" according to the XRANDR spec [1]. Some drivers (Intel) export both properties and some only the specified property (nvidia). Users of drivers that only export the specified property cannot change their backlight using XRANDR. [1] http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt section 9.1 https://bugzilla.gnome.org/show_bug.cgi?id=723606
-rw-r--r--src/core/monitor-xrandr.c6
-rw-r--r--src/meta/atomnames.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/monitor-xrandr.c b/src/core/monitor-xrandr.c
index d8ee2a2c..1265e205 100644
--- a/src/core/monitor-xrandr.c
+++ b/src/core/monitor-xrandr.c
@@ -187,7 +187,7 @@ output_get_backlight_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
XRRGetOutputProperty (manager_xrandr->xdisplay,
(XID)output->output_id,
- display->atom_BACKLIGHT,
+ display->atom_Backlight,
0, G_MAXLONG, False, False, XA_INTEGER,
&actual_type, &actual_format,
&nitems, &bytes_after, &buffer);
@@ -212,7 +212,7 @@ output_get_backlight_limits_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
meta_error_trap_push (display);
info = XRRQueryOutputProperty (manager_xrandr->xdisplay,
(XID)output->output_id,
- display->atom_BACKLIGHT);
+ display->atom_Backlight);
meta_error_trap_pop (display);
if (info == NULL)
@@ -945,7 +945,7 @@ meta_monitor_manager_xrandr_change_backlight (MetaMonitorManager *manager,
meta_error_trap_push (display);
XRRChangeOutputProperty (manager_xrandr->xdisplay,
(XID)output->output_id,
- display->atom_BACKLIGHT,
+ display->atom_Backlight,
XA_INTEGER, 32, PropModeReplace,
(unsigned char *) &hw_value, 1);
meta_error_trap_pop (display);
diff --git a/src/meta/atomnames.h b/src/meta/atomnames.h
index 8b7346a5..5696523d 100644
--- a/src/meta/atomnames.h
+++ b/src/meta/atomnames.h
@@ -80,7 +80,7 @@ item(MULTIPLE)
item(TIMESTAMP)
item(VERSION)
item(ATOM_PAIR)
-item(BACKLIGHT)
+item(Backlight)
item(hotplug_mode_update)
/* Oddities: These are used, and we need atoms for them,