diff -Nurp gnome-desktop-2.26.0.orig/libgnome-desktop/gnome-rr.c gnome-desktop-2.26.0/libgnome-desktop/gnome-rr.c
--- gnome-desktop-2.26.0.orig/libgnome-desktop/gnome-rr.c	2009-03-16 23:37:06.000000000 +0100
+++ gnome-desktop-2.26.0/libgnome-desktop/gnome-rr.c	2009-03-20 17:26:00.000000000 +0100
@@ -295,6 +295,7 @@ static gboolean
 fill_out_screen_info (Display *xdisplay,
 		      Window xroot,
 		      ScreenInfo *info,
+		      gboolean needs_reprobe,
 		      GError **error)
 {
     XRRScreenResources *resources;
@@ -302,36 +303,58 @@ fill_out_screen_info (Display *xdisplay,
     g_assert (xdisplay != NULL);
     g_assert (info != NULL);
     
-    gdk_error_trap_push ();
-    
-    if (!XRRGetScreenSizeRange (xdisplay, xroot,
-                                &(info->min_width),
-                                &(info->min_height),
-                                &(info->max_width),
-                                &(info->max_height))) {
-        /* XRR caught an error */
-	g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_RANDR_ERROR,
-		     _("could not get the range of screen sizes"));
-        return FALSE;
-    }
-    
-    gdk_flush ();
-    if (gdk_error_trap_pop ())
-    {
-        /* Unhandled X Error was generated */
-	g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_UNKNOWN,
-		     _("unhandled X error while getting the range of screen sizes"));
-        return FALSE;
-    }
-    
+    if (needs_reprobe) {
+        gdk_error_trap_push ();
+        
+        if (!XRRGetScreenSizeRange (xdisplay, xroot,
+                                    &(info->min_width),
+                                    &(info->min_height),
+                                    &(info->max_width),
+                                    &(info->max_height))) {
+            /* XRR caught an error */
+    	g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_RANDR_ERROR,
+    		     _("could not get the range of screen sizes"));
+            return FALSE;
+        }
+        
+        gdk_flush ();
+        if (gdk_error_trap_pop ())
+        {
+            /* Unhandled X Error was generated */
+    	g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_UNKNOWN,
+    		     _("unhandled X error while getting the range of screen sizes"));
+            return FALSE;
 #if 0
     g_print ("ranges: %d - %d; %d - %d\n",
 	     screen->min_width, screen->max_width,
 	     screen->min_height, screen->max_height);
 #endif
-    
-    resources = XRRGetScreenResources (xdisplay, xroot);
-    
+        }
+        
+        resources = XRRGetScreenResources (xdisplay, xroot);    
+    }
+    else {
+    /* XRRGetScreenResourcesCurrent is less expensive than
+     * XRRGetScreenResources, however it is available only
+     * in RandR 1.3 or higher
+     */
+#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
+        int rr_major_version;
+        int rr_minor_version;
+        XRRQueryVersion(xdisplay, &rr_minor_version, &rr_major_version);
+        
+        /* Runtime check for RandR 1.3 or higher */
+        if (rr_major_version == 1 && rr_minor_version >= 3) {
+            resources = XRRGetScreenResourcesCurrent (xdisplay, xroot);
+        }
+        else {
+            resources = XRRGetScreenResources (xdisplay, xroot);
+        }
+#else
+        resources = XRRGetScreenResources (xdisplay, xroot);
+#endif
+    }
+
     if (resources)
     {
 	int i;
@@ -415,7 +438,7 @@ fill_out_screen_info (Display *xdisplay,
 }
 
 static ScreenInfo *
-screen_info_new (GnomeRRScreen *screen, GError **error)
+screen_info_new (GnomeRRScreen *screen, gboolean needs_reprobe, GError **error)
 {
     ScreenInfo *info = g_new0 (ScreenInfo, 1);
     
@@ -426,7 +449,7 @@ screen_info_new (GnomeRRScreen *screen, 
     info->modes = NULL;
     info->screen = screen;
     
-    if (fill_out_screen_info (screen->xdisplay, screen->xroot, info, error))
+    if (fill_out_screen_info (screen->xdisplay, screen->xroot, info, needs_reprobe, error))
     {
 	return info;
     }
@@ -438,14 +461,14 @@ screen_info_new (GnomeRRScreen *screen, 
 }
 
 static gboolean
-screen_update (GnomeRRScreen *screen, gboolean force_callback, GError **error)
+screen_update (GnomeRRScreen *screen, gboolean force_callback, gboolean needs_reprobe, GError **error)
 {
     ScreenInfo *info;
     gboolean changed = FALSE;
     
     g_assert (screen != NULL);
 
-    info = screen_info_new (screen, error);
+    info = screen_info_new (screen, needs_reprobe, error);
     if (!info)
 	    return FALSE;
 
@@ -476,6 +499,13 @@ screen_on_event (GdkXEvent *xevent,
 	
 	switch (event->subtype)
 	{
+	case RRNotify_OutputProperty:
+	    /* Use a cheap call for 
+	     * changes in output 
+	     * properties
+	     */
+	    screen_update (screen, TRUE, FALSE, NULL);
+	    return GDK_FILTER_CONTINUE;
 	default:
 	    break;
 	}
@@ -483,7 +513,7 @@ screen_on_event (GdkXEvent *xevent,
 	/* FIXME: we may need to be more discriminating in
 	 * what causes 'changed' events
 	 */
-	screen_update (screen, TRUE, NULL); /* NULL-GError */
+	screen_update (screen, TRUE, TRUE, NULL); /* NULL-GError */
     }
     
     /* Pass the event on to GTK+ */
@@ -522,7 +552,7 @@ gnome_rr_screen_new (GdkScreen *gdk_scre
 	
 	screen->randr_event_base = event_base;
 	
-	screen->info = screen_info_new (screen, error);
+	screen->info = screen_info_new (screen, TRUE, error);
 	
 	if (!screen->info) {
 	    g_free (screen);
@@ -618,7 +648,7 @@ gnome_rr_screen_refresh (GnomeRRScreen *
 			 GError       **error)
 {
     g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-    return screen_update (screen, FALSE, error);
+    return screen_update (screen, FALSE, TRUE, error);
 }
 
 GnomeRRMode **
