From d7fef52254126aa5897a5c58faeda1f61d5b13d8 Mon Sep 17 00:00:00 2001 From: Kevin E Martin Date: Thu, 2 Sep 2004 04:04:47 +0000 Subject: Workaround for servers using rootless layer with damage (Bug #1168, Torrey T. Lyons). --- miext/damage/damage.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- cgit v1.2.3