Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > e265b08b6bebf8514a189c80db57a2d3 > files > 14

x11-server-1.3.0.0-25.1mdv2008.0.src.rpm

From 4ea7b985598ceb46c02d833803ad0d2bad6dbfd2 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@koto.keithp.com>
Date: Tue, 7 Aug 2007 12:45:53 -0700
Subject: [PATCH] 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.
---
 randr/rrinfo.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index bd5d5b1..8b0c93d 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
-- 
1.5.2.4