Index: xorg/hw/xfree86/dri/dri.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/dri/dri.c,v retrieving revision 1.23 diff -u -r1.23 dri.c --- xorg/hw/xfree86/dri/dri.c 3 Apr 2006 01:35:05 -0000 1.23 +++ xorg/hw/xfree86/dri/dri.c 18 Sep 2006 01:18:00 -0000 @@ -1406,10 +1406,7 @@ pDRIPriv->partial3DContextStore); } - if (pDRIPriv->windowsTouched) - DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1); - pDRIPriv->windowsTouched = FALSE; - + DRIUnlockDrawableIfTouched(pScreen); DRIUnlock(pScreen); } @@ -1883,6 +1880,15 @@ } void +DRIUnlockDrawableIfTouched(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if (pDRIPriv->windowsTouched) + DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1); + pDRIPriv->windowsTouched = FALSE; +} + +void DRIUnlock(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); Index: xorg/hw/xfree86/dri/dri.h =================================================================== RCS file: /cvs/xorg/xserver/xorg/hw/xfree86/dri/dri.h,v retrieving revision 1.8 diff -u -r1.8 dri.h --- xorg/hw/xfree86/dri/dri.h 24 Sep 2005 18:45:45 -0000 1.8 +++ xorg/hw/xfree86/dri/dri.h 18 Sep 2006 01:18:00 -0000 @@ -302,6 +302,8 @@ extern void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); +extern void DRIUnlockDrawableIfTouched(ScreenPtr pScreen); + extern void DRILock(ScreenPtr pScreen, int flags); extern void DRIUnlock(ScreenPtr pScreen);