diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c index c6323dd75..3cd9db5d9 100644 --- a/Xi/xiwarppointer.c +++ b/Xi/xiwarppointer.c @@ -177,7 +177,7 @@ ProcXIWarpPointer(ClientPtr client) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(pDev, pSprite->hotShape, &x, &y); + ConfineToShape(pSprite->hotShape, &x, &y); (*newScreen->SetCursorPosition) (pDev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(pDev)) { diff --git a/dix/events.c b/dix/events.c index 68f74c734..b9378691b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -691,7 +691,7 @@ SetCriticalEvent(int event) } void -ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) +ConfineToShape(RegionPtr shape, int *px, int *py) { BoxRec box; int x = *px, y = *py; @@ -761,7 +761,7 @@ CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, else if (new.y >= pSprite->physLimits.y2) new.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); + ConfineToShape(pSprite->hotShape, &new.x, &new.y); if (( #ifdef XINERAMA noPanoramiXExtension && @@ -881,7 +881,7 @@ CheckVirtualMotion(DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin) } if (reg) - ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y); + ConfineToShape(reg, &pSprite->hot.x, &pSprite->hot.y); if (qe && ev) { qe->pScreen = pSprite->hot.pScreen; @@ -3194,7 +3194,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) else if (pSprite->hot.y >= pSprite->physLimits.y2) pSprite->hot.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, + ConfineToShape(pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); pSprite->hotPhys = pSprite->hot; @@ -3617,7 +3617,7 @@ XineramaWarpPointer(ClientPtr client) else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); + ConfineToShape(pSprite->hotShape, &x, &y); XineramaSetCursorPosition(PickPointer(client), x, y, TRUE); @@ -3720,7 +3720,7 @@ ProcWarpPointer(ClientPtr client) else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) - ConfineToShape(dev, pSprite->hotShape, &x, &y); + ConfineToShape(pSprite->hotShape, &x, &y); (*newScreen->SetCursorPosition) (dev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(dev)) { diff --git a/dix/input_priv.h b/dix/input_priv.h index 64ef9372b..d63f1ddb3 100644 --- a/dix/input_priv.h +++ b/dix/input_priv.h @@ -378,12 +378,11 @@ CursorPtr InputDevGetSpriteCursor(DeviceIntPtr pDev) * is constrained to specific region. it moves the position so it fits * into the region. * - * @param pDev pointer to device (unused) * @param region pointer to the constraining region * @param px in/out buffer for X position * @param py in/out buffer for Y position */ -void ConfineToShape(DeviceIntPtr pDev, RegionPtr region, int *px, int *py) - _X_ATTRIBUTE_NONNULL_ARG(2,3,4); +void ConfineToShape(RegionPtr region, int *px, int *py) + _X_ATTRIBUTE_NONNULL_ARG(1,2,3); #endif /* _XSERVER_INPUT_PRIV_H */