[mutter/wayland] xrandr: Use specified output property name for backlight control



commit f68d65a5aed13193b4f232f5d257f3367752a29e
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Feb 4 12:36:11 2014 +0000

    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

 src/backends/x11/meta-monitor-manager-xrandr.c |    6 +++---
 src/meta/atomnames.h                           |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c
index 86ce344..f8284a0 100644
--- a/src/backends/x11/meta-monitor-manager-xrandr.c
+++ b/src/backends/x11/meta-monitor-manager-xrandr.c
@@ -186,7 +186,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);
@@ -211,7 +211,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)
@@ -947,7 +947,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 38227de..46e1a66 100644
--- a/src/meta/atomnames.h
+++ b/src/meta/atomnames.h
@@ -78,7 +78,7 @@ item(MULTIPLE)
 item(TIMESTAMP)
 item(VERSION)
 item(ATOM_PAIR)
-item(BACKLIGHT)
+item(Backlight)
 item(_XKB_RULES_NAMES)
 item(hotplug_mode_update)
 item(WL_SURFACE_ID)


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