Blob Blame History Raw
commit cbd6fefb5ae24c409c56a104e8aa37693cebc6c0
Author: Matthias Clasen <mclasen@redhat.com>
Date:   Tue Mar 9 11:05:57 2010 +0000

    Ignore errors when setting the monitor size fails
    
    Otherwise the front-end application might crash with BadMatch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=599914

diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 1ef9c3c..2e86898 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -743,8 +743,11 @@ gnome_rr_screen_set_size (GnomeRRScreen *screen,
     g_return_if_fail (screen != NULL);
 
 #ifdef HAVE_RANDR
+    gdk_error_trap_push ();
     XRRSetScreenSize (screen->xdisplay, screen->xroot,
 		      width, height, mm_width, mm_height);
+    gdk_flush ();
+    gdk_error_trap_pop (); /* ignore error */
 #endif
 }