[gnome-desktop] gnome-rr: Make sure DPMS takes effect immediately



commit 332c0fd2d9b7fd2a60ebcf5c039368ad455c6a48
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jan 14 11:08:02 2013 +0100

    gnome-rr: Make sure DPMS takes effect immediately
    
    Otherwise, with DPMS Off:
    - querying xbacklight will return 0 as the backlight
      is actually off
    - setting the backlight won't have any effect if we haven't
      processed the DPMS On yet
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691701

 libgnome-desktop/gnome-rr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 73490d0..ee558b1 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -1268,6 +1268,7 @@ gnome_rr_screen_set_dpms_mode (GnomeRRScreen *screen,
     gdk_error_trap_push ();
     /* DPMSForceLevel() return value is often a lie, so ignore it */
     DPMSForceLevel (screen->priv->xdisplay, state);
+    XSync (screen->priv->xdisplay, False);
     if (gdk_error_trap_pop ()) {
         ret = FALSE;
         g_set_error_literal (error,



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