xserver: Branch 'master'
Eric Anholt
anholt at kemper.freedesktop.org
Wed Jan 27 16:49:03 PST 2016
hw/kdrive/ephyr/ephyr_glamor_glx.c | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit d8ecbe563991cc689e95a8cb9d510e920eaceea0
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Jan 27 16:46:06 2016 -0800
ephyr: catch X errors if we try to create a core context and fail.
This stops Xephyr failing on GLXBadFBConfig.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
diff --git a/hw/kdrive/ephyr/ephyr_glamor_glx.c b/hw/kdrive/ephyr/ephyr_glamor_glx.c
index b9fe8d1..0981144 100644
--- a/hw/kdrive/ephyr/ephyr_glamor_glx.c
+++ b/hw/kdrive/ephyr/ephyr_glamor_glx.c
@@ -280,9 +280,16 @@ ephyr_glamor_process_event(xcb_generic_event_t *xev)
XUnlockDisplay(dpy);
}
+static int
+ephyr_glx_error_handler(Display * _dpy, XErrorEvent * ev)
+{
+ return 0;
+}
+
struct ephyr_glamor *
ephyr_glamor_glx_screen_init(xcb_window_t win)
{
+ int (*oldErrorHandler) (Display *, XErrorEvent *);
static const float position[] = {
-1, -1,
1, -1,
@@ -332,8 +339,11 @@ ephyr_glamor_glx_screen_init(xcb_window_t win)
GLAMOR_GL_CORE_VER_MINOR,
0,
};
+ oldErrorHandler = XSetErrorHandler(ephyr_glx_error_handler);
ctx = glXCreateContextAttribsARB(dpy, fb_config, NULL, True,
context_attribs);
+ XSync(dpy, False);
+ XSetErrorHandler(oldErrorHandler);
if (!ctx)
ctx = glXCreateContext(dpy, visual_info, NULL, True);
}
More information about the xorg-commit
mailing list