diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-01-14 18:09:44 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-09-16 10:00:08 -0700 |
commit | 5b9f3ea2501a886fb74e5248e82a95e76443f1e8 (patch) | |
tree | a967501dadfcf31299582a41626e4ab304f40c08 | |
parent | bd8ecd9be1568b59258b6d2f78530ede345b7c7a (diff) |
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 <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/modes/xf86RandR12.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index b13612371..d34bce2f6 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -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); xf86RandR12CreateMonitors(pScreen); + + if (!pScreen->isGPU) { + rp->primaryOutput = config->output[0]->randr_output; + RROutputChanged(rp->primaryOutput, FALSE); + rp->layoutChanged = TRUE; + } + return TRUE; } |