diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-12 20:05:43 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-13 11:17:02 +0930 |
commit | 913989d643595030e67e7c0a758a16ae0da62ed9 (patch) | |
tree | 4a83e82e85add3b72c8f17bf1c045fd5a49b1864 /mi | |
parent | 248a1df63430717550adb0e79068d8f9fcfacb0b (diff) |
mi: don't try to display a cursor for devices w/o cursors.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mipointer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c index 8f8086cc9..572af1b88 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -199,6 +199,11 @@ miPointerDisplayCursor (pDev, pScreen, pCursor) if (!pDev->isMaster && !pDev->u.master) return FALSE; + /* return for keyboards */ + if ((pDev->isMaster && !DevHasCursor(pDev)) || + (!pDev->isMaster && pDev->u.master && !DevHasCursor(pDev->u.master))) + return; + pPointer = MIPOINTER(pDev); pPointer->pCursor = pCursor; @@ -449,7 +454,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) else if (pPointer->pCursor != pPointer->pSpriteCursor) { pCursor = pPointer->pCursor; - if (pCursor->bits->emptyMask && !pScreenPriv->showTransparent) + if (!pCursor || (pCursor->bits->emptyMask && !pScreenPriv->showTransparent)) pCursor = NullCursor; (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); @@ -461,7 +466,7 @@ miPointerUpdateSprite (DeviceIntPtr pDev) { pPointer->devx = x; pPointer->devy = y; - if(!pPointer->pCursor->bits->emptyMask) + if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } |