diff options
author | Kristian Høgsberg <[email protected]> | 2010-08-27 12:40:11 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-09-08 09:20:42 -0400 |
commit | 16887d042a917fa4773e4d853f50051b54e9948c (patch) | |
tree | 6e31237b62e2d49e5544a05a64d99a95015b1d39 /src/glx/glxcurrent.c | |
parent | b4bb6680200b5a898583392f4c831c02f41e63f7 (diff) |
glx: Drop broken drawable garbage collection
Doesn't work for pixmaps, was looking up the GLX XID and was never thread
safe. Instead, just destroy the client side structures when the
drawable is no long current for a context.
Diffstat (limited to 'src/glx/glxcurrent.c')
-rw-r--r-- | src/glx/glxcurrent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c index 98f66c22898..710985b02c1 100644 --- a/src/glx/glxcurrent.c +++ b/src/glx/glxcurrent.c @@ -242,13 +242,13 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, return False; } - if (oldGC != &dummyContext && oldGC != gc) { + if (oldGC != &dummyContext) { oldGC->vtable->unbind(oldGC, gc); oldGC->currentDpy = 0; oldGC->currentDrawable = None; oldGC->currentReadable = None; oldGC->thread_id = 0; - if (oldGC->xid == None) + if (oldGC->xid == None && oldGC != gc) /* We are switching away from a context that was * previously destroyed, so we need to free the memory * for the old handle. @@ -257,12 +257,12 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, } if (gc) { - ret = gc->vtable->bind(gc, oldGC, draw, read); gc->currentDpy = dpy; gc->currentDrawable = draw; gc->currentReadable = read; gc->thread_id = _glthread_GetID(); __glXSetCurrentContext(gc); + ret = gc->vtable->bind(gc, oldGC, draw, read); } else { __glXSetCurrentContextNull(); } |