diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-12-29 17:00:45 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-12-29 17:00:45 +0100 |
commit | 5a36fcb6a5899e5cfdf6d65e05e3f999d5d25b2a (patch) | |
tree | a2095802ebe5f4b622e3a5b1759b226ccfb4c017 /src/vmwarecurs.c | |
parent | 4bec18ab8dffd90ab84b986de2136a9d848d3a4a (diff) |
VMWAREComposite: Only hide cursor if source picture is backed by drawable.
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=14208 .
Diffstat (limited to 'src/vmwarecurs.c')
-rw-r--r-- | src/vmwarecurs.c | 36 |
1 files 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; |