From 832742e1f3b426329c843302c871903cd1f68a38 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Mar 2016 14:34:03 -0500 Subject: [PATCH] x11: Trap errors around an XRandr call Apparently, we can get X errors here. Ignore them. https://bugzilla.gnome.org/show_bug.cgi?id=762907 --- gdk/x11/gdkscreen-x11.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 063b597922..9d8ed20810 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -649,10 +649,14 @@ init_randr15 (GdkScreen *screen) for (i = 0; i < num_rr_monitors; i++) { RROutput output = rr_monitors[i].outputs[0]; - XRROutputInfo *output_info = - XRRGetOutputInfo (x11_screen->xdisplay, resources, output); + XRROutputInfo *output_info; GdkX11Monitor monitor; + gdk_x11_display_error_trap_push (display); + output_info = XRRGetOutputInfo (x11_screen->xdisplay, resources, output); + if (gdk_x11_display_error_trap_pop (display)) + continue; + if (output_info == NULL) continue;