Compare commits
4 Commits
master
...
wip/xrandr
Author | SHA1 | Date | |
---|---|---|---|
|
e3f795779b | ||
|
dc76cfc769 | ||
|
4132f66be6 | ||
|
94ddca562a |
|
@ -1755,6 +1755,8 @@ ProcRRSetCrtcTransform(ClientPtr client)
|
||||||
filter, nbytes, params, nparams);
|
filter, nbytes, params, nparams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CrtcTransformExtra (SIZEOF(xRRGetCrtcTransformReply) - 32)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
transform_filter_length(RRTransformPtr transform)
|
transform_filter_length(RRTransformPtr transform)
|
||||||
{
|
{
|
||||||
|
@ -1812,6 +1814,7 @@ ProcRRGetCrtcTransform(ClientPtr client)
|
||||||
RRCrtcPtr crtc;
|
RRCrtcPtr crtc;
|
||||||
int nextra;
|
int nextra;
|
||||||
RRTransformPtr current, pending;
|
RRTransformPtr current, pending;
|
||||||
|
char *extra;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
|
||||||
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
||||||
|
@ -1822,16 +1825,14 @@ ProcRRGetCrtcTransform(ClientPtr client)
|
||||||
nextra = (transform_filter_length(pending) +
|
nextra = (transform_filter_length(pending) +
|
||||||
transform_filter_length(current));
|
transform_filter_length(current));
|
||||||
|
|
||||||
char *extra_buf = calloc(1, nextra);
|
extra = calloc(1, nextra);
|
||||||
if (!extra_buf)
|
if (!extra)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
char *extra = extra_buf;
|
|
||||||
|
|
||||||
xRRGetCrtcTransformReply rep = {
|
xRRGetCrtcTransformReply rep = {
|
||||||
.type = X_Reply,
|
.type = X_Reply,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = bytes_to_int32(sizeof(xRRGetCrtcTransformReply) - sizeof(xReq) + nextra),
|
.length = bytes_to_int32(CrtcTransformExtra + nextra),
|
||||||
.hasTransforms = crtc->transforms,
|
.hasTransforms = crtc->transforms,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1850,8 +1851,8 @@ ProcRRGetCrtcTransform(ClientPtr client)
|
||||||
swapl(&rep.length);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetCrtcTransformReply), &rep);
|
WriteToClient(client, sizeof(xRRGetCrtcTransformReply), &rep);
|
||||||
WriteToClient(client, nextra, extra_buf);
|
WriteToClient(client, nextra, extra);
|
||||||
free(extra_buf);
|
free(extra);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue