From a831622d9044fb4d18ced92e92fcbf9af128e81c Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 21 Sep 2010 14:37:34 +0100 Subject: [PATCH] glx: Don't delete current context of a drawable when drawable is deleted Nothing in the GLX protocol constrains the lifetime of a context to the lifetime of a drawable it is bound to. https://bugs.freedesktop.org/show_bug.cgi?id=30089 This partially reverts commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3. Signed-off-by: Jon TURNEY --- glx/glxext.c | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/glx/glxext.c b/glx/glxext.c index e203156..a9b7e64 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -139,31 +139,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) for (c = glxAllContexts; c; c = c->next) { if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { - int i; - (*c->loseCurrent)(c); c->isCurrent = GL_FALSE; if (c == __glXLastContext) __glXFlushContextCache(); - - for (i = 1; i < currentMaxClients; i++) { - if (clients[i]) { - __GLXclientState *cl = glxGetClient(clients[i]); - - if (cl->inUse) { - int j; - - for (j = 0; j < cl->numCurrentContexts; j++) { - if (cl->currentContexts[j] == c) - cl->currentContexts[j] = NULL; - } - } - } - } - - if (!c->idExists) { - __glXFreeContext(c); - } } if (c->drawPriv == glxPriv) c->drawPriv = NULL; -- 1.7.1