VMWAREComposite: Only hide cursor if source picture is backed by drawable.
authorMichel Dänzer <daenzer@vmware.com>
Tue, 29 Dec 2009 16:00:45 +0000 (17:00 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Tue, 29 Dec 2009 16:00:45 +0000 (17:00 +0100)
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=14208 .

src/vmwarecurs.c

index b7c61fa..017af28 100644 (file)
@@ -436,24 +436,26 @@ VMWAREComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
     PictureScreenPtr ps = GetPictureScreen(pScreen);
     BoxRec box;
     Bool hidden = FALSE;
-    
-    VmwareLog(("VMWAREComposite op = %d, pSrc = %p, pMask = %p, pDst = %p,"
-               " src = (%d, %d), mask = (%d, %d), dst = (%d, %d), w = %d,"
-               " h = %d\n", op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
-               xDst, yDst, width, height));
-
-    /*
-     * We only worry about the source region here, since shadowfb or XAA will
-     * take care of the destination region.
-     */
-    box.x1 = pSrc->pDrawable->x + xSrc;
-    box.y1 = pSrc->pDrawable->y + ySrc;
-    box.x2 = box.x1 + width;
-    box.y2 = box.y1 + height;
 
-    if (BOX_INTERSECT(box, pVMWARE->hwcur.box)) {
-        PRE_OP_HIDE_CURSOR();
-        hidden = TRUE;
+    if (pSrc->pDrawable) {
+        VmwareLog(("VMWAREComposite op = %d, pSrc = %p, pMask = %p, pDst = %p,"
+                   " src = (%d, %d), mask = (%d, %d), dst = (%d, %d), w = %d,"
+                   " h = %d\n", op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
+                   xDst, yDst, width, height));
+
+        /*
+         * We only worry about the source region here, since shadowfb or XAA
+         * will take care of the destination region.
+         */
+        box.x1 = pSrc->pDrawable->x + xSrc;
+        box.y1 = pSrc->pDrawable->y + ySrc;
+        box.x2 = box.x1 + width;
+        box.y2 = box.y1 + height;
+
+        if (BOX_INTERSECT(box, pVMWARE->hwcur.box)) {
+            PRE_OP_HIDE_CURSOR();
+            hidden = TRUE;
+        }
     }
     
     ps->Composite = pVMWARE->Composite;