From 5a36fcb6a5899e5cfdf6d65e05e3f999d5d25b2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 29 Dec 2009 17:00:45 +0100 Subject: [PATCH] VMWAREComposite: Only hide cursor if source picture is backed by drawable. Should fix https://bugs.freedesktop.org/show_bug.cgi?id=14208 . --- src/vmwarecurs.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/vmwarecurs.c b/src/vmwarecurs.c index b7c61fa..017af28 100644 --- a/src/vmwarecurs.c +++ b/src/vmwarecurs.c @@ -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; -- 2.7.4