summaryrefslogtreecommitdiff
path: root/src/glx/dri2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-08-27 12:40:11 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-09-08 09:20:42 -0400
commit16887d042a917fa4773e4d853f50051b54e9948c (patch)
tree6e31237b62e2d49e5544a05a64d99a95015b1d39 /src/glx/dri2.c
parentb4bb6680200b5a898583392f4c831c02f41e63f7 (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/dri2.c')
-rw-r--r--src/glx/dri2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glx/dri2.c b/src/glx/dri2.c
index d70ec5a3ec..d410898648 100644
--- a/src/glx/dri2.c
+++ b/src/glx/dri2.c
@@ -175,6 +175,14 @@ DRI2Error(Display *display, xError *err, XExtCodes *codes, int *ret_code)
err->minorCode == X_DRI2CopyRegion)
return True;
+ /* If the X drawable was destroyed before the GLX drawable, the
+ * DRI2 drawble will be gone by the time we call
+ * DRI2DestroyDrawable. So just ignore BadDrawable here. */
+ if (err->majorCode == codes->major_opcode &&
+ err->errorCode == BadDrawable &&
+ err->minorCode == X_DRI2DestroyDrawable)
+ return True;
+
return False;
}