summaryrefslogtreecommitdiff
path: root/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'glx/glxext.c')
-rw-r--r--glx/glxext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index 93391e9fd..6bc7bef8e 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -126,6 +126,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
__GLXcontext *c;
for (c = glxAllContexts; c; c = c->next) {
+ if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+ (*c->loseCurrent)(c);
+ __glXFlushContextCache();
+ }
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
if (c->readPriv == glxPriv)