diff --git a/dix/property.c b/dix/property.c index d18c981f18..5ed1599420 100644 --- a/dix/property.c +++ b/dix/property.c @@ -257,14 +257,31 @@ ProcRotateProperties(ClientPtr client) int ProcChangeProperty(ClientPtr client) { + REQUEST(xChangePropertyReq); + REQUEST_AT_LEAST_SIZE(xChangePropertyReq); + + if (client->swapped) { + swapl(&stuff->window); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->nUnits); + switch (stuff->format) { + case 8: + break; + case 16: + SwapRestS(stuff); + break; + case 32: + SwapRestL(stuff); + break; + } + } + char format, mode; unsigned long len; int sizeInBytes, err; uint64_t totalSize; - REQUEST(xChangePropertyReq); - - REQUEST_AT_LEAST_SIZE(xChangePropertyReq); UpdateCurrentTime(); format = stuff->format; mode = stuff->mode; diff --git a/dix/swapreq.c b/dix/swapreq.c index 7849163616..a7a4f6b53e 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -169,28 +169,6 @@ SProcConfigureWindow(ClientPtr client) } -int _X_COLD -SProcChangeProperty(ClientPtr client) -{ - REQUEST(xChangePropertyReq); - REQUEST_AT_LEAST_SIZE(xChangePropertyReq); - swapl(&stuff->window); - swapl(&stuff->property); - swapl(&stuff->type); - swapl(&stuff->nUnits); - switch (stuff->format) { - case 8: - break; - case 16: - SwapRestS(stuff); - break; - case 32: - SwapRestL(stuff); - break; - } - return ((*ProcVector[X_ChangeProperty]) (client)); -} - int _X_COLD SProcGetProperty(ClientPtr client) { diff --git a/dix/tables.c b/dix/tables.c index 492fc7a0d0..b3cc94a6ec 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -349,7 +349,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcQueryTree, /* 15 */ ProcInternAtom, ProcGetAtomName, - SProcChangeProperty, + ProcChangeProperty, ProcDeleteProperty, SProcGetProperty, /* 20 */ ProcListProperties, diff --git a/include/swapreq.h b/include/swapreq.h index 657090b58a..5eabe25bb7 100644 --- a/include/swapreq.h +++ b/include/swapreq.h @@ -39,7 +39,6 @@ int SProcChangeHosts(ClientPtr client); int SProcChangeKeyboardControl(ClientPtr client); int SProcChangeKeyboardMapping(ClientPtr client); int SProcChangePointerControl(ClientPtr client); -int SProcChangeProperty(ClientPtr client); int SProcChangeWindowAttributes(ClientPtr client); int SProcClearToBackground(ClientPtr client); int SProcConfigureWindow(ClientPtr client);