Index: libgnome-desktop/gnome-rr.c
===================================================================
--- libgnome-desktop/gnome-rr.c	(revision 5348)
+++ libgnome-desktop/gnome-rr.c	(working copy)
@@ -67,6 +67,9 @@
     
     int				randr_event_base;
     
+    int				randr_major;
+    int				randr_minor;
+    
     GnomeRRScreenChanged	callback;
     gpointer			data;
 };
@@ -324,11 +327,13 @@
 }
 
 static gboolean
-fill_out_screen_info (Display *xdisplay,
-		      Window xroot,
+fill_out_screen_info (GnomeRRScreen *screen,
 		      ScreenInfo *info,
 		      GError **error)
 {
+    Display *xdisplay = screen->xdisplay;
+    Window *xroot = screen->xroot;
+    
     XRRScreenResources *resources;
     
     g_assert (xdisplay != NULL);
@@ -362,7 +367,13 @@
 	     screen->min_height, screen->max_height);
 #endif
     
-    resources = XRRGetScreenResources (xdisplay, xroot);
+    /* XRRGetScreenResourcesCurrent is less expensive than
+       XRRGetScreenResources, however it is available only
+       in RandR 1.3 or higher */
+    if (screen->randr_major == 1 && screen->randr_minor >= 3)
+        resources = XRRGetScreenResourcesCurrent (xdisplay, xroot);
+    else
+        resources = XRRGetScreenResources (xdisplay, xroot);
     
     if (resources)
     {
@@ -458,7 +469,7 @@
     info->modes = NULL;
     info->screen = screen;
     
-    if (fill_out_screen_info (screen->xdisplay, screen->xroot, info, error))
+    if (fill_out_screen_info (screen, info, error))
     {
 	return info;
     }
@@ -559,6 +570,10 @@
 	    return NULL;
 	}
 	
+	screen->randr_major = -1;
+	screen->randr_minor = -1;
+	XRRQueryVersion (dpy, &screen->randr_major, &screen->randr_minor);
+	
 	XRRSelectInput (screen->xdisplay,
 			screen->xroot,
 			RRScreenChangeNotifyMask	|
