summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri/dri.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-02-15 16:27:50 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-02-20 19:21:25 +0100
commit3344a4eda704edc7dc30037f095de277a60a70bb (patch)
treedf26423154c1eb856dc9b27fcaaf36fa2ced73c4 /hw/xfree86/dri/dri.c
parent3c7a27dc77595ad018bb7c4f7cef6bc178268cb6 (diff)
DRI: Make sure number of DRI windows is accurate in driver ClipNotify hook.
Always call DRI{De,In}creaseNumberVisible (which in turn calls DRIDriverClipNotify) after updating pDRIPriv->nrWindows.
Diffstat (limited to 'hw/xfree86/dri/dri.c')
-rw-r--r--hw/xfree86/dri/dri.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index bdef75ad9..c183e2a1f 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1134,11 +1134,11 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id,
pWin->devPrivates[DRIWindowPrivIndex].ptr =
(pointer)pDRIDrawablePriv;
+ pDRIPriv->nrWindows++;
+
if (pDRIDrawablePriv->nrects)
DRIIncreaseNumberVisible(pScreen);
- pDRIPriv->nrWindows++;
-
/* track this in case this window is destroyed */
AddResource(id, DRIDrawablePrivResType, (pointer)pWin);
}
@@ -1210,13 +1210,13 @@ DRIDrawablePrivDelete(pointer pResource, XID id)
return FALSE;
}
- if (pDRIDrawablePriv->nrects)
- DRIDecreaseNumberVisible(pDrawable->pScreen);
-
xfree(pDRIDrawablePriv);
pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL;
pDRIPriv->nrWindows--;
+
+ if (REGION_NUM_RECTS(&pWin->clipList))
+ DRIDecreaseNumberVisible(pDrawable->pScreen);
}
else { /* pixmap (or for GLX 1.3, a PBuffer) */
/* NOT_DONE */