diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 7489e9c81c..c7f5b64589 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -2498,9 +2498,15 @@ PanoramiXAllocColor(ClientPtr client) PanoramiXRes *cmap; REQUEST(xAllocColorReq); - REQUEST_SIZE_MATCH(xAllocColorReq); + if (client->swapped) { + swapl(&stuff->cmap); + swaps(&stuff->red); + swaps(&stuff->green); + swaps(&stuff->blue); + } + client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, diff --git a/dix/dispatch.c b/dix/dispatch.c index 8cbfdff597..9fe5af0f13 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2710,6 +2710,13 @@ ProcAllocColor(ClientPtr client) REQUEST(xAllocColorReq); REQUEST_SIZE_MATCH(xAllocColorReq); + if (client->swapped) { + swapl(&stuff->cmap); + swaps(&stuff->red); + swaps(&stuff->green); + swaps(&stuff->blue); + } + xAllocColorReply rep = { .red = stuff->red, .green = stuff->green, diff --git a/dix/swapreq.c b/dix/swapreq.c index 125ebd17a5..de9f1399eb 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -584,18 +584,6 @@ SProcCopyColormapAndFree(ClientPtr client) return ((*ProcVector[X_CopyColormapAndFree]) (client)); } -int _X_COLD -SProcAllocColor(ClientPtr client) -{ - REQUEST(xAllocColorReq); - REQUEST_SIZE_MATCH(xAllocColorReq); - swapl(&stuff->cmap); - swaps(&stuff->red); - swaps(&stuff->green); - swaps(&stuff->blue); - return ((*ProcVector[X_AllocColor]) (client)); -} - int _X_COLD SProcAllocNamedColor(ClientPtr client) { diff --git a/dix/swapreq.h b/dix/swapreq.h index 5eabe25bb7..8b10d536ed 100644 --- a/dix/swapreq.h +++ b/dix/swapreq.h @@ -30,7 +30,6 @@ extern void SwapColorItem(xColorItem * /* pItem */ ); extern void SwapConnClientPrefix(xConnClientPrefix * /* pCCP */ ); -int SProcAllocColor(ClientPtr client); int SProcAllocColorCells(ClientPtr client); int SProcAllocColorPlanes(ClientPtr client); int SProcAllocNamedColor(ClientPtr client); diff --git a/dix/tables.c b/dix/tables.c index fcf948f0ba..5f1c14b1bd 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -416,7 +416,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcInstallColormap, ProcUninstallColormap, ProcListInstalledColormaps, - SProcAllocColor, + ProcAllocColor, SProcAllocNamedColor, /* 85 */ SProcAllocColorCells, SProcAllocColorPlanes,