From 441344ba7ed2a1d162ee33ac4bac4bf645188ceb Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 21 Sep 2010 09:56:05 -0400 Subject: glx: Hold on to drawables if we're just switching to another context https://bugs.freedesktop.org/show_bug.cgi?id=30234 --- src/glx/dri2_glx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/glx/dri2_glx.c') diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 8247588e76b..911298b37c8 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -118,6 +118,8 @@ dri2_destroy_context(struct glx_context *context) struct dri2_context *pcp = (struct dri2_context *) context; struct dri2_screen *psc = (struct dri2_screen *) context->psc; + driReleaseDrawables(&pcp->base); + if (context->xid) glx_send_destroy_context(psc->base.dpy, context->xid); @@ -158,7 +160,8 @@ dri2_unbind_context(struct glx_context *context, struct glx_context *new) (*psc->core->unbindContext) (pcp->driContext); - driReleaseDrawables(&pcp->base); + if (context == new) + driReleaseDrawables(&pcp->base); } static struct glx_context * -- cgit v1.2.3