Index: Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/Imakefile,v retrieving revision 1.3 diff -u -r1.3 Imakefile --- Imakefile 12 Aug 2004 08:45:33 -0000 1.3 +++ Imakefile 1 Sep 2004 01:31:41 -0000 @@ -8,6 +8,11 @@ #endif #endif +#if (defined(XWinServer) && XWinServer && BuildXWinMultiWindowExtWM) || \ + (defined(XDarwinServer) && XDarwinServer && DarwinQuartzSupport) +DEFINES = -DROOTLESS_WORKAROUND +#endif + SRCS = damage.c OBJS = damage.o Index: damage.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/damage/damage.c,v retrieving revision 1.9 diff -u -r1.9 damage.c --- damage.c 14 Aug 2004 07:12:37 -0000 1.9 +++ damage.c 1 Sep 2004 01:31:41 -0000 @@ -78,6 +78,14 @@ { ScreenPtr pScreen = pDrawable->pScreen; +#ifdef ROOTLESS_WORKAROUND + if (!((WindowPtr)pDrawable)->viewable) + { + static DamagePtr nullDamage = 0; + return &nullDamage; + } +#endif + pPixmap = 0; if (pScreen->GetWindowPixmap) pPixmap = (*pScreen->GetWindowPixmap) ((WindowPtr)pDrawable);