From 66089e9129a821cfb1983d3d35f41b975a52de5e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 25 Mar 2009 12:55:42 +1000 Subject: [PATCH] xfree86: fix SWCursor check in xf86CursorSetCursor. Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when the pointer left the screen (in a Xinerama setup). We must call the sprite rendering function if - SW cursors are enabled, or - The current device is not the VCP and not attached to the VCP. Reported-by: Gordon Yuan Signed-off-by: Peter Hutterer --- hw/xfree86/ramdac/xf86Cursor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index b86655031..b474ff318 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -302,9 +302,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ - if (ScreenPriv->SWCursor || pDev != inputInfo.pointer) - (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, - x, y); + if (ScreenPriv->SWCursor || + !(pDev == inputInfo.pointer || !IsMaster(pDev) && + GetMaster(pDev->u.master, MASTER_POINTER) == inputInfo.pointer)) + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE;