summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@koto.keithp.com>2007-08-07 12:45:53 -0700
committerKeith Packard <keithp@koto.keithp.com>2007-08-07 12:47:18 -0700
commitb4193a2eee80895c5641e77488df0e72a73a3d99 (patch)
tree46ec465b4283d7ee6470e7149f74660e332436af
parent2b93cbb5f8bac9b1b75f723baaa728430b5fefff (diff)
RRScanOldConfig wasn't getting crtcs set correctly
The output crtc is set by RRCrtcNotify, which is called at the end of RRScanOldConfig. Several uses of output->crtc in this function were wrong.
-rw-r--r--randr/rrinfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index bd5d5b1bb..8b0c93dd9 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -98,7 +98,6 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
if (!output)
return;
RROutputSetCrtcs (output, &crtc, 1);
- output->crtc = crtc;
RROutputSetConnection (output, RR_Connected);
#ifdef RENDER
RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen));
@@ -108,7 +107,9 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
output = RRFirstOutput (pScreen);
if (!output)
return;
- crtc = output->crtc;
+ crtc = pScrPriv->crtcs[0];
+ if (!crtc)
+ return;
/* check rotations */
if (rotations != crtc->rotations)
@@ -168,7 +169,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
/* notice current mode */
if (newMode)
- RRCrtcNotify (output->crtc, newMode, 0, 0, pScrPriv->rotation,
+ RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
1, &output);
}
#endif