composite: use REPLY_*() macros for preparing / sending replies
Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
7baf8767a0
commit
adefed6226
|
@ -105,11 +105,7 @@ ProcCompositeQueryVersion(ClientPtr client)
|
|||
REQUEST_FIELD_CARD32(minorVersion);
|
||||
|
||||
CompositeClientPtr pCompositeClient = GetCompositeClient(client);
|
||||
xCompositeQueryVersionReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0
|
||||
};
|
||||
xCompositeQueryVersionReply rep = { 0 };
|
||||
|
||||
if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) {
|
||||
rep.majorVersion = stuff->majorVersion;
|
||||
|
@ -121,14 +117,10 @@ ProcCompositeQueryVersion(ClientPtr client)
|
|||
}
|
||||
pCompositeClient->major_version = rep.majorVersion;
|
||||
pCompositeClient->minor_version = rep.minorVersion;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.majorVersion);
|
||||
swapl(&rep.minorVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xCompositeQueryVersionReply), &rep);
|
||||
return Success;
|
||||
|
||||
REPLY_FIELD_CARD32(majorVersion);
|
||||
REPLY_FIELD_CARD32(minorVersion);
|
||||
REPLY_SEND_RET_SUCCESS();
|
||||
}
|
||||
|
||||
#define VERIFY_WINDOW(pWindow, wid, client, mode) \
|
||||
|
@ -267,7 +259,6 @@ SingleCompositeNameWindowPixmap(ClientPtr client, xCompositeNameWindowPixmapReq
|
|||
static int
|
||||
SingleCompositeGetOverlayWindow(ClientPtr client, xCompositeGetOverlayWindowReq *stuff)
|
||||
{
|
||||
xCompositeGetOverlayWindowReply rep;
|
||||
WindowPtr pWin;
|
||||
ScreenPtr pScreen;
|
||||
CompScreenPtr cs;
|
||||
|
@ -303,21 +294,12 @@ SingleCompositeGetOverlayWindow(ClientPtr client, xCompositeGetOverlayWindowReq
|
|||
return rc;
|
||||
}
|
||||
|
||||
rep = (xCompositeGetOverlayWindowReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
xCompositeGetOverlayWindowReply rep = {
|
||||
.overlayWin = cs->pOverlayWin->drawable.id
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.overlayWin);
|
||||
}
|
||||
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);
|
||||
|
||||
return Success;
|
||||
REPLY_FIELD_CARD32(overlayWin);
|
||||
REPLY_SEND_RET_SUCCESS();
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -682,7 +664,6 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
|
|||
if (!compositeUseXinerama)
|
||||
return SingleCompositeGetOverlayWindow(client, stuff);
|
||||
|
||||
xCompositeGetOverlayWindowReply rep;
|
||||
WindowPtr pWin;
|
||||
ScreenPtr pScreen;
|
||||
CompScreenPtr cs;
|
||||
|
@ -760,20 +741,12 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
|
|||
|
||||
cs = GetCompScreen(screenInfo.screens[0]);
|
||||
|
||||
rep = (xCompositeGetOverlayWindowReply) {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
xCompositeGetOverlayWindowReply rep = {
|
||||
.overlayWin = cs->pOverlayWin->drawable.id
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.overlayWin);
|
||||
}
|
||||
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);
|
||||
return Success;
|
||||
REPLY_FIELD_CARD32(overlayWin);
|
||||
REPLY_SEND_RET_SUCCESS();
|
||||
#else
|
||||
return SingleCompositeGetOverlayWindow(client, stuff);
|
||||
#endif /* XINERAMA */
|
||||
|
|
Loading…
Reference in New Issue