mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
randr: ProcRRQueryProviderProperty(): use x_rpcbuf_t
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
41506c8fae
commit
25e71fcb2a
@@ -380,26 +380,16 @@ ProcRRQueryProviderProperty(ClientPtr client)
|
||||
if (!prop)
|
||||
return BadName;
|
||||
|
||||
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
|
||||
x_rpcbuf_write_INT32s(&rpcbuf, prop->valid_values, prop->num_valid);
|
||||
|
||||
xRRQueryProviderPropertyReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = prop->num_valid,
|
||||
.pending = prop->is_pending,
|
||||
.range = prop->range,
|
||||
.immutable = prop->immutable
|
||||
};
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
WriteToClient(client, sizeof(xRRQueryProviderPropertyReply), (char *) &rep);
|
||||
if (prop->num_valid) {
|
||||
if (client->swapped)
|
||||
CopySwap32Write(client, prop->num_valid * sizeof(INT32), (CARD32*)prop->valid_values);
|
||||
else
|
||||
WriteToClient(client, prop->num_valid * sizeof(INT32), prop->valid_values);
|
||||
}
|
||||
return Success;
|
||||
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user