[gtk+/gtk-3-18] x11: Trap errors around an XRandr call
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] x11: Trap errors around an XRandr call
- Date: Thu, 10 Mar 2016 04:25:52 +0000 (UTC)
commit d93d777d9978b2c97420566f93aa5621a62c834e
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 4 14:34:03 2016 -0500
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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 5231474..2bd7f28 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]