summaryrefslogtreecommitdiff
path: root/miext/damage/damage.c
diff options
context:
space:
mode:
Diffstat (limited to 'miext/damage/damage.c')
-rwxr-xr-xmiext/damage/damage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index b4b893855..f87adb7a5 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -78,6 +78,14 @@ getDrawableDamageRef (DrawablePtr pDrawable)
{
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);