[PATCH] Rootless: src drawable window can now be NULL

Jeremy Huddleston jeremyhu at freedesktop.org
Tue Oct 13 12:50:20 PDT 2009


On Oct 13, 2009, at 01:45, Colin Harrison wrote:

> Hi,
>
> This is one for Jeremy Huddleston and Jon Turney.
>
> Found when testing rootless modes in Xming using the new xeyes (uses  
> Xrender
> to anti-alias).
>
> Patch to fix the crash and make it work...
>

Looks like we need this in RootlessGlyphs as well...

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/ 
rootlessScreen.c
index b10ca70..c73d517 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -257,7 +257,7 @@ RootlessComposite(CARD8 op, PicturePtr pSrc,  
PicturePtr pMask, PicturePtr pDst,
          maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
                    (WindowPtr)pMask->pDrawable :  NULL;
      }
-    srcWin  = (pSrc->pDrawable->type  == DRAWABLE_WINDOW) ?
+    srcWin  = (pSrc->pDrawable && pSrc->pDrawable->type  ==  
DRAWABLE_WINDOW) ?
                (WindowPtr)pSrc->pDrawable  :  NULL;
      dstWin  = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
                (WindowPtr)pDst->pDrawable  :  NULL;
@@ -297,7 +297,7 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc,  
PicturePtr pDst,
      GlyphPtr glyph;
      WindowPtr srcWin, dstWin;

-    srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ?
+    srcWin = (pSrc->pDrawable && pSrc->pDrawable->type ==  
DRAWABLE_WINDOW) ?
               (WindowPtr)pSrc->pDrawable  :  NULL;
      dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ?
               (WindowPtr)pDst->pDrawable  :  NULL;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3333 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091013/b2ee7265/attachment-0001.bin 


More information about the xorg-devel mailing list