From b2ef7df476af619903ef7f6b6962b371ae14306c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sat, 19 Mar 2016 13:44:10 -0400 Subject: [PATCH] xquartz/glx: Error out for MakeContextCurrent(draw != read) CGL doesn't have a way to express this directly, unlike EGL WGL and GLX. It might be implementable, but it's never actually worked, and it's a fairly niche feature so we're better off throwing an error if someone attempts it. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Adam Jackson --- hw/xquartz/GL/indirect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c index 4f3e2e472..544cb780c 100644 --- a/hw/xquartz/GL/indirect.c +++ b/hw/xquartz/GL/indirect.c @@ -387,6 +387,9 @@ __glXAquaContextMakeCurrent(__GLXcontext *baseContext) GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%p)\n", baseContext); + if (context->base.drawPriv != context->base.readPriv) + return 0; + if (attach(context, drawPriv)) return /*error*/ 0;