mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 14:03:17 +00:00
panoramiX: PanoramiXGetImage(): move down reply struct
Move down reply struct declaration/assignment and byte-swapping to right before the write-out. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
475d53fb58
commit
e0748cf74e
@ -2057,14 +2057,6 @@ PanoramiXGetImage(ClientPtr client)
|
||||
length = widthBytesLine * h * Ones(planemask & (plane | (plane - 1)));
|
||||
}
|
||||
|
||||
xGetImageReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.visual = wVisual(((WindowPtr) pDraw)),
|
||||
.depth = pDraw->depth,
|
||||
.length = bytes_to_int32(length),
|
||||
};
|
||||
|
||||
if (widthBytesLine == 0 || h == 0)
|
||||
linesPerBuf = 0;
|
||||
else if (widthBytesLine >= XINERAMA_IMAGE_BUFSIZE)
|
||||
@ -2075,11 +2067,6 @@ PanoramiXGetImage(ClientPtr client)
|
||||
linesPerBuf = h;
|
||||
}
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.visual);
|
||||
}
|
||||
|
||||
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
|
||||
|
||||
@ -2125,6 +2112,20 @@ PanoramiXGetImage(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
xGetImageReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.visual = wVisual(((WindowPtr) pDraw)),
|
||||
.depth = pDraw->depth,
|
||||
.length = bytes_to_int32(length),
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.visual);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
WriteRpcbufToClient(client, &rpcbuf);
|
||||
return Success;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user