Xext: panoramiX: ProcXineramaQueryScreens(): reply payload in one block
Simplify writing reply payload into just one block. This also makes further simplifications by subsequent patches easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
b619f19c84
commit
1d9c412683
|
@ -1067,23 +1067,23 @@ ProcXineramaQueryScreens(ClientPtr client)
|
||||||
WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
|
WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
|
||||||
|
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
xXineramaScreenInfo scratch;
|
xXineramaScreenInfo scratch[number]; // upper bound limited, number of screens
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(i) {
|
FOR_NSCREENS_BACKWARD(i) {
|
||||||
scratch.x_org = screenInfo.screens[i]->x;
|
scratch[i].x_org = screenInfo.screens[i]->x;
|
||||||
scratch.y_org = screenInfo.screens[i]->y;
|
scratch[i].y_org = screenInfo.screens[i]->y;
|
||||||
scratch.width = screenInfo.screens[i]->width;
|
scratch[i].width = screenInfo.screens[i]->width;
|
||||||
scratch.height = screenInfo.screens[i]->height;
|
scratch[i].height = screenInfo.screens[i]->height;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&scratch.x_org);
|
swaps(&scratch[i].x_org);
|
||||||
swaps(&scratch.y_org);
|
swaps(&scratch[i].y_org);
|
||||||
swaps(&scratch.width);
|
swaps(&scratch[i].width);
|
||||||
swaps(&scratch.height);
|
swaps(&scratch[i].height);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sz_XineramaScreenInfo, &scratch);
|
|
||||||
}
|
}
|
||||||
|
WriteToClient(client, sizeof(scratch), &scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
Loading…
Reference in New Issue