mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
xkb: inline SProcXkbGetNames() and SProcXkbSetNames()
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:
committed by
Enrico Weigelt
parent
1b719f8710
commit
68e134de44
25
xkb/xkb.c
25
xkb/xkb.c
@@ -3742,12 +3742,17 @@ XkbAssembleNames(ClientPtr client, XkbDescPtr xkb, xkbGetNamesReply rep, x_rpcbu
|
||||
int
|
||||
ProcXkbGetNames(ClientPtr client)
|
||||
{
|
||||
DeviceIntPtr dev;
|
||||
XkbDescPtr xkb;
|
||||
|
||||
REQUEST(xkbGetNamesReq);
|
||||
REQUEST_SIZE_MATCH(xkbGetNamesReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&stuff->deviceSpec);
|
||||
swapl(&stuff->which);
|
||||
}
|
||||
|
||||
DeviceIntPtr dev;
|
||||
XkbDescPtr xkb;
|
||||
|
||||
if (!(client->xkbClientFlags & _XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
@@ -4187,14 +4192,22 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq * stuff)
|
||||
int
|
||||
ProcXkbSetNames(ClientPtr client)
|
||||
{
|
||||
REQUEST(xkbSetNamesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&stuff->deviceSpec);
|
||||
swaps(&stuff->virtualMods);
|
||||
swapl(&stuff->which);
|
||||
swapl(&stuff->indicators);
|
||||
swaps(&stuff->totalKTLevelNames);
|
||||
}
|
||||
|
||||
DeviceIntPtr dev;
|
||||
CARD32 *tmp;
|
||||
Atom bad;
|
||||
int rc;
|
||||
|
||||
REQUEST(xkbSetNamesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
|
||||
|
||||
if (!(client->xkbClientFlags & _XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
|
||||
@@ -294,29 +294,6 @@ SProcXkbSetNamedIndicator(ClientPtr client)
|
||||
return ProcXkbSetNamedIndicator(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXkbGetNames(ClientPtr client)
|
||||
{
|
||||
REQUEST(xkbGetNamesReq);
|
||||
REQUEST_SIZE_MATCH(xkbGetNamesReq);
|
||||
swaps(&stuff->deviceSpec);
|
||||
swapl(&stuff->which);
|
||||
return ProcXkbGetNames(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXkbSetNames(ClientPtr client)
|
||||
{
|
||||
REQUEST(xkbSetNamesReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
|
||||
swaps(&stuff->deviceSpec);
|
||||
swaps(&stuff->virtualMods);
|
||||
swapl(&stuff->which);
|
||||
swapl(&stuff->indicators);
|
||||
swaps(&stuff->totalKTLevelNames);
|
||||
return ProcXkbSetNames(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXkbGetGeometry(ClientPtr client)
|
||||
{
|
||||
@@ -414,9 +391,9 @@ SProcXkbDispatch(ClientPtr client)
|
||||
case X_kbSetNamedIndicator:
|
||||
return SProcXkbSetNamedIndicator(client);
|
||||
case X_kbGetNames:
|
||||
return SProcXkbGetNames(client);
|
||||
return ProcXkbGetNames(client);
|
||||
case X_kbSetNames:
|
||||
return SProcXkbSetNames(client);
|
||||
return ProcXkbSetNames(client);
|
||||
case X_kbGetGeometry:
|
||||
return SProcXkbGetGeometry(client);
|
||||
case X_kbSetGeometry:
|
||||
|
||||
Reference in New Issue
Block a user