mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xfixes: simplify dispatcher
The dispatcher functions are much more complex than they're usually are (just switch/case statement). Bring them in line with the standard scheme used in the Xserver, so further steps become easier. It's also much cleaner to use the defines from proto headers instead of raw numbers. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -295,7 +295,7 @@ SProcXFixesSelectCursorInput(ClientPtr client)
|
||||
REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
|
||||
swapl(&stuff->window);
|
||||
swapl(&stuff->eventMask);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesSelectCursorInput(client);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
@@ -407,13 +407,6 @@ ProcXFixesGetCursorImage(ClientPtr client)
|
||||
return Success;
|
||||
}
|
||||
|
||||
int _X_COLD
|
||||
SProcXFixesGetCursorImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXFixesGetCursorImageReq);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
int
|
||||
ProcXFixesSetCursorName(ClientPtr client)
|
||||
{
|
||||
@@ -441,7 +434,7 @@ SProcXFixesSetCursorName(ClientPtr client)
|
||||
REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
|
||||
swapl(&stuff->cursor);
|
||||
swaps(&stuff->nbytes);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesSetCursorName(client);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -486,7 +479,7 @@ SProcXFixesGetCursorName(ClientPtr client)
|
||||
REQUEST(xXFixesGetCursorNameReq);
|
||||
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
|
||||
swapl(&stuff->cursor);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesGetCursorName(client);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -559,13 +552,6 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||
return Success;
|
||||
}
|
||||
|
||||
int _X_COLD
|
||||
SProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXFixesGetCursorImageAndNameReq);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find every cursor reference in the system, ask testCursor
|
||||
* whether it should be replaced with a reference to pCursor.
|
||||
@@ -692,7 +678,7 @@ SProcXFixesChangeCursor(ClientPtr client)
|
||||
REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
|
||||
swapl(&stuff->source);
|
||||
swapl(&stuff->destination);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesChangeCursor(client);
|
||||
}
|
||||
|
||||
static Bool
|
||||
@@ -729,7 +715,7 @@ SProcXFixesChangeCursorByName(ClientPtr client)
|
||||
REQUEST_AT_LEAST_SIZE(xXFixesChangeCursorByNameReq);
|
||||
swapl(&stuff->source);
|
||||
swaps(&stuff->nbytes);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesChangeCursorByName(client);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -883,7 +869,7 @@ SProcXFixesHideCursor(ClientPtr client)
|
||||
REQUEST(xXFixesHideCursorReq);
|
||||
REQUEST_SIZE_MATCH(xXFixesHideCursorReq);
|
||||
swapl(&stuff->window);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesHideCursor(client);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -931,7 +917,7 @@ SProcXFixesShowCursor(ClientPtr client)
|
||||
REQUEST(xXFixesShowCursorReq);
|
||||
REQUEST_SIZE_MATCH(xXFixesShowCursorReq);
|
||||
swapl(&stuff->window);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
return ProcXFixesShowCursor(client);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1017,7 +1003,7 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
|
||||
swaps(in_devices + i);
|
||||
}
|
||||
|
||||
return ProcXFixesVector[stuff->xfixesReqType] (client);
|
||||
return ProcXFixesCreatePointerBarrier(client);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -1036,7 +1022,7 @@ SProcXFixesDestroyPointerBarrier(ClientPtr client)
|
||||
REQUEST(xXFixesDestroyPointerBarrierReq);
|
||||
REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
|
||||
swapl(&stuff->barrier);
|
||||
return ProcXFixesVector[stuff->xfixesReqType] (client);
|
||||
return ProcXFixesDestroyPointerBarrier(client);
|
||||
}
|
||||
|
||||
Bool
|
||||
|
||||
Reference in New Issue
Block a user