From d737fdbebe1e60c049f2199256b60f8875db0eaa Mon Sep 17 00:00:00 2001 From: Thomas Jaeger Date: Mon, 21 Sep 2009 20:25:40 -0400 Subject: [PATCH 1/3] dix: Don't call RealizeCursor/DisplayCursor for floated devices Otherwise, we get "[mi] miSpriteRealizeCursor/miSpriteDisplayCursor called for floating device" error messages whenever a device gets floated. --- dix/events.c | 10 ++++++---- mi/mipointer.c | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dix/events.c b/dix/events.c index 85c8f9a..7cc8910 100644 --- a/dix/events.c +++ b/dix/events.c @@ -960,7 +960,8 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) #endif pScreen = pSprite->hotPhys.pScreen; - (*pScreen->DisplayCursor)(pDev, pScreen, cursor); + if (IsMaster(pDev) || pDev->u.master) + (*pScreen->DisplayCursor)(pDev, pScreen, cursor); FreeCursor(pSprite->current, (Cursor)0); pSprite->current = cursor; pSprite->current->refcnt++; @@ -3034,7 +3035,8 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) if (pScreen) { - (*pScreen->RealizeCursor) ( pDev, pScreen, pSprite->current); + if (IsMaster(pDev) || pDev->u.master) + (*pScreen->RealizeCursor) ( pDev, pScreen, pSprite->current); (*pScreen->CursorLimits) ( pDev, pScreen, pSprite->current, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = FALSE; @@ -3044,7 +3046,6 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, pSprite->hot.y, FALSE); - (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); } #ifdef PANORAMIX if(!noPanoramiXExtension) { @@ -3109,7 +3110,8 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) &pSprite->physLimits); pSprite->confined = FALSE; (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); - (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); + if (IsMaster(pDev) || pDev->u.master) + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); #ifdef PANORAMIX if(!noPanoramiXExtension) { diff --git a/mi/mipointer.c b/mi/mipointer.c index e1f63be..225d2f2 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -399,7 +399,8 @@ miPointerUpdateSprite (DeviceIntPtr pDev) (*pOldPriv->screenFuncs->CrossScreen) (pPointer->pSpriteScreen, FALSE); } (*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE); - (*pScreenPriv->spriteFuncs->SetCursor) + if (IsMaster(pDev) || pDev->u.master) + (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pPointer->pCursor, x, y); pPointer->devx = x; pPointer->devy = y; -- 1.6.3.3