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.
This commit is contained in:
Michel Dänzer 2007-02-15 16:27:50 +01:00
parent 3c7a27dc77
commit 3344a4eda7

View File

@ -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 */