summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri/xf86dri.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-07-10 09:02:08 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-07-10 09:02:08 +0200
commit4abd00dab7e648dab8172f6009371e4e63d0c521 (patch)
tree5e14974581a23fbedf33a221f050ede09d6d2baa /hw/xfree86/dri/xf86dri.c
parent5957aa6fdc580ccad4557eeefa0636ffad823f33 (diff)
Make sure DRI drawables are cleaned up when client dies.
The previous scheme didn't work when the client didn't create the core drawable, e.g. the root or composite overlay window. Use refcounting via special client resources to fix that.
Diffstat (limited to 'hw/xfree86/dri/xf86dri.c')
-rw-r--r--hw/xfree86/dri/xf86dri.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 9690e8895..fdf0e9983 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -404,10 +404,8 @@ ProcXF86DRICreateDrawable(
if (rc != Success)
return rc;
- if (!DRICreateDrawable( screenInfo.screens[stuff->screen],
- (Drawable)stuff->drawable,
- pDrawable,
- (drm_drawable_t *)&rep.hHWDrawable)) {
+ if (!DRICreateDrawable(screenInfo.screens[stuff->screen], client,
+ pDrawable, (drm_drawable_t *)&rep.hHWDrawable)) {
return BadValue;
}
@@ -435,9 +433,8 @@ ProcXF86DRIDestroyDrawable(
if (rc != Success)
return rc;
- if (!DRIDestroyDrawable( screenInfo.screens[stuff->screen],
- (Drawable)stuff->drawable,
- pDrawable)) {
+ if (!DRIDestroyDrawable(screenInfo.screens[stuff->screen], client,
+ pDrawable)) {
return BadValue;
}