RandR 1.2 spec says CRTC info contains screen-relative geometry.

Was reporting mode size instead of adjusting for rotation.
(cherry picked from commit e2e7c47a528447e90cff6cf10d2ce457742ef48d)
This commit is contained in:
Keith Packard 2007-04-15 22:59:19 -03:00
parent cc4eb1c7ea
commit b5823ea3e1

View File

@ -518,6 +518,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
RROutput *outputs; RROutput *outputs;
RROutput *possible; RROutput *possible;
int i, j, k, n; int i, j, k, n;
int width, height;
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq); REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
crtc = LookupCrtc(client, stuff->crtc, DixReadAccess); crtc = LookupCrtc(client, stuff->crtc, DixReadAccess);
@ -540,8 +541,9 @@ ProcRRGetCrtcInfo (ClientPtr client)
rep.timestamp = pScrPriv->lastSetTime.milliseconds; rep.timestamp = pScrPriv->lastSetTime.milliseconds;
rep.x = crtc->x; rep.x = crtc->x;
rep.y = crtc->y; rep.y = crtc->y;
rep.width = mode ? mode->mode.width : 0; RRCrtcGetScanoutSize (crtc, &width, &height);
rep.height = mode ? mode->mode.height : 0; 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;