[gnome-desktop/randr-hotplug: 6/9] Don't force a reprobe of the RANDR outputs on every RANDR event



commit 778fcb5b9e9202e5f95b6e8a22074c56d852269a
Author: Federico Mena Quintero <federico novell com>
Date:   Mon Jun 8 19:11:01 2009 -0500

    Don't force a reprobe of the RANDR outputs on every RANDR event
    
    The X server sent us a RANDR event, in fact, because it knows the latest
    state of the outputs and it knows that something changed.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>
---
 libgnome-desktop/gnome-rr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index ed87c11..dea5a05 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -497,10 +497,11 @@ screen_on_event (GdkXEvent *xevent,
     event_num = e->type - screen->randr_event_base;
 
     if (event_num == RRScreenChangeNotify) {
-	/* If outputs are either connected or disconnected, reprobe hardware
-	 * and/or get the screen size again.
+	/* We don't reprobe the hardware; we just fetch the X server's latest
+	 * state.  The server already knows the new state of the outputs; that's
+	 * why it sent us an event!
 	 */
-        screen_update (screen, TRUE, TRUE, NULL); /* NULL-GError */
+        screen_update (screen, TRUE, FALSE, NULL); /* NULL-GError */
     }
 #if 0
     /* WHY THIS CODE IS DISABLED:



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