[gnome-desktop] Ignore errors when setting the monitor size fails



commit 02a2110544e186f2e8597340d6635af5e5355fc0
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

 libgnome-desktop/gnome-rr.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 7a8c03c..edfc2a9 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
 }
 



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