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 24 Aug 2004 04:24:04 -0000 @@ -26,6 +26,7 @@ #include #endif #include +#include #include "scrnintstr.h" #include "windowstr.h" #include "font.h" @@ -95,7 +96,9 @@ } #define getDrawableDamage(pDrawable) (*getDrawableDamageRef (pDrawable)) -#define getWindowDamage(pWin) getDrawableDamage(&(pWin)->drawable) +#define getWindowDamage(pWin) ((pWin)->viewable ? \ + getDrawableDamage(&(pWin)->drawable) \ + : 0) #define drawableDamage(pDrawable) \ DamagePtr pDamage = getDrawableDamage(pDrawable)