Make RandR CRTC info report panning area instead of just crtc area
This makes the RandR info consistent with the Xinerama info. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
ea309e4745
commit
6e49fdd2c8
|
@ -655,6 +655,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
RROutput *possible;
|
RROutput *possible;
|
||||||
int i, j, k, n;
|
int i, j, k, n;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
BoxRec panned_area;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
|
||||||
crtc = LookupCrtc(client, stuff->crtc, DixReadAccess);
|
crtc = LookupCrtc(client, stuff->crtc, DixReadAccess);
|
||||||
|
@ -675,11 +676,23 @@ ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
|
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
rep.x = crtc->x;
|
if (pScrPriv->rrGetPanning &&
|
||||||
rep.y = crtc->y;
|
pScrPriv->rrGetPanning (pScreen, crtc, &panned_area, NULL, NULL) &&
|
||||||
RRCrtcGetScanoutSize (crtc, &width, &height);
|
(panned_area.x2 > panned_area.x1) && (panned_area.y2 > panned_area.y1))
|
||||||
rep.width = width;
|
{
|
||||||
rep.height = height;
|
rep.x = panned_area.x1;
|
||||||
|
rep.y = panned_area.y1;
|
||||||
|
rep.width = panned_area.x2 - panned_area.x1;
|
||||||
|
rep.height = panned_area.y2 - panned_area.y1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RRCrtcGetScanoutSize (crtc, &width, &height);
|
||||||
|
rep.x = crtc->x;
|
||||||
|
rep.y = crtc->y;
|
||||||
|
rep.width = width;
|
||||||
|
rep.height = height;
|
||||||
|
}
|
||||||
rep.mode = mode ? mode->mode.id : 0;
|
rep.mode = mode ? mode->mode.id : 0;
|
||||||
rep.rotation = crtc->rotation;
|
rep.rotation = crtc->rotation;
|
||||||
rep.rotations = crtc->rotations;
|
rep.rotations = crtc->rotations;
|
||||||
|
|
Loading…
Reference in New Issue