xkb: inline SProcXkbSetControls()

No need to have whole extra functions for just a few LoC.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-24 16:52:21 +02:00
committed by Enrico Weigelt
parent 3e9c40015f
commit 25bd1d3b69
2 changed files with 30 additions and 35 deletions

View File

@@ -773,6 +773,35 @@ ProcXkbGetControls(ClientPtr client)
int
ProcXkbSetControls(ClientPtr client)
{
REQUEST(xkbSetControlsReq);
REQUEST_SIZE_MATCH(xkbSetControlsReq);
if (client->swapped) {
swaps(&stuff->deviceSpec);
swaps(&stuff->affectInternalVMods);
swaps(&stuff->internalVMods);
swaps(&stuff->affectIgnoreLockVMods);
swaps(&stuff->ignoreLockVMods);
swaps(&stuff->axOptions);
swapl(&stuff->affectEnabledCtrls);
swapl(&stuff->enabledCtrls);
swapl(&stuff->changeCtrls);
swaps(&stuff->repeatDelay);
swaps(&stuff->repeatInterval);
swaps(&stuff->slowKeysDelay);
swaps(&stuff->debounceDelay);
swaps(&stuff->mkDelay);
swaps(&stuff->mkInterval);
swaps(&stuff->mkTimeToMax);
swaps(&stuff->mkMaxSpeed);
swaps(&stuff->mkCurve);
swaps(&stuff->axTimeout);
swapl(&stuff->axtCtrlsMask);
swapl(&stuff->axtCtrlsValues);
swaps(&stuff->axtOptsMask);
swaps(&stuff->axtOptsValues);
}
DeviceIntPtr dev, tmpd;
XkbSrvInfoPtr xkbi;
XkbControlsPtr ctrl;
@@ -781,9 +810,6 @@ ProcXkbSetControls(ClientPtr client)
XkbEventCauseRec cause;
XkbSrvLedInfoPtr sli;
REQUEST(xkbSetControlsReq);
REQUEST_SIZE_MATCH(xkbSetControlsReq);
if (!(client->xkbClientFlags & _XkbClientInitialized))
return BadAccess;

View File

@@ -137,37 +137,6 @@ SProcXkbLatchLockState(ClientPtr client)
return ProcXkbLatchLockState(client);
}
static int _X_COLD
SProcXkbSetControls(ClientPtr client)
{
REQUEST(xkbSetControlsReq);
REQUEST_SIZE_MATCH(xkbSetControlsReq);
swaps(&stuff->deviceSpec);
swaps(&stuff->affectInternalVMods);
swaps(&stuff->internalVMods);
swaps(&stuff->affectIgnoreLockVMods);
swaps(&stuff->ignoreLockVMods);
swaps(&stuff->axOptions);
swapl(&stuff->affectEnabledCtrls);
swapl(&stuff->enabledCtrls);
swapl(&stuff->changeCtrls);
swaps(&stuff->repeatDelay);
swaps(&stuff->repeatInterval);
swaps(&stuff->slowKeysDelay);
swaps(&stuff->debounceDelay);
swaps(&stuff->mkDelay);
swaps(&stuff->mkInterval);
swaps(&stuff->mkTimeToMax);
swaps(&stuff->mkMaxSpeed);
swaps(&stuff->mkCurve);
swaps(&stuff->axTimeout);
swapl(&stuff->axtCtrlsMask);
swapl(&stuff->axtCtrlsValues);
swaps(&stuff->axtOptsMask);
swaps(&stuff->axtOptsValues);
return ProcXkbSetControls(client);
}
static int _X_COLD
SProcXkbSetMap(ClientPtr client)
{
@@ -280,7 +249,7 @@ SProcXkbDispatch(ClientPtr client)
case X_kbGetControls:
return ProcXkbGetControls(client);
case X_kbSetControls:
return SProcXkbSetControls(client);
return ProcXkbSetControls(client);
case X_kbGetMap:
return ProcXkbGetMap(client);
case X_kbSetMap: