Commit 5b9f3ea2 authored by Michel Dänzer's avatar Michel Dänzer Committed by Keith Packard

xfree86/modes: Set RandR primary output from CreateScreenResources

Fixes XRRGetOutputPrimary and xrandr not reporting a primary output after
startup. This was especially confusing when an output was explicitly
marked as primary using Option "Primary" in Section "Monitor".
Signed-off-by: Michel Dänzer's avatarMichel Dänzer <>
Reviewed-by: default avatarAlex Deucher <>
Signed-off-by: Keith Packard's avatarKeith Packard <>
parent bd8ecd9b
......@@ -1748,6 +1748,7 @@ xf86RandR12CreateScreenResources12(ScreenPtr pScreen)
int c;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
if (xf86RandR12Key == NULL)
......@@ -1760,6 +1761,13 @@ xf86RandR12CreateScreenResources12(ScreenPtr pScreen)
config->maxWidth, config->maxHeight);
if (!pScreen->isGPU) {
rp->primaryOutput = config->output[0]->randr_output;
RROutputChanged(rp->primaryOutput, FALSE);
rp->layoutChanged = TRUE;
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment