diff options
Diffstat (limited to 'hw/xfree86/dri/dri.c')
-rw-r--r-- | hw/xfree86/dri/dri.c | 10 |
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 */ |