aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-17 11:45:05 +0000
committermarha <marha@users.sourceforge.net>2011-01-17 11:45:05 +0000
commit508dc9ebf90c336c43608a7b8e94d0d2bdf6c1aa (patch)
tree7f99f9df965eab67cdbb5ff4d33624bf50221033 /xorg-server/glx/glxext.c
parent260ff71e2ae7eac8d6856523bf4d92ac8e2c507f (diff)
downloadvcxsrv-508dc9ebf90c336c43608a7b8e94d0d2bdf6c1aa.tar.gz
vcxsrv-508dc9ebf90c336c43608a7b8e94d0d2bdf6c1aa.tar.bz2
vcxsrv-508dc9ebf90c336c43608a7b8e94d0d2bdf6c1aa.zip
Previous fix in glxext.c was to drastically. It could cause crashes.
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 958c5b544..89c1030f7 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -49,6 +49,8 @@
#include "indirect_table.h"
#include "indirect_util.h"
+extern void FlushContext(struct glx_context *cx);
+
/*
** The last context used by the server. It is the context that is current
** from the server's perspective.
@@ -144,12 +146,14 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
int i;
+ FlushContext(c);
+
(*c->loseCurrent)(c);
c->isCurrent = GL_FALSE;
if (c == __glXLastContext)
__glXFlushContextCache();
-/*
- for (i = 1; i < currentMaxClients; i++) {
+ if (!c->idExists) {
+ for (i = 1; i < currentMaxClients; i++) {
if (clients[i]) {
__GLXclientState *cl = glxGetClient(clients[i]);
@@ -162,8 +166,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
}
}
}
+ }
}
-*/
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;