dix: drop unused parameter from ConfineToShape()

The device parameter is never used, so no point in passing it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-23 14:24:59 +02:00
parent 2da45bd9ca
commit 4b45c749e4
3 changed files with 9 additions and 10 deletions

View File

@ -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)) {

View File

@ -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)) {

View File

@ -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 */