Fix XineramaQueryScreens for reverse prime

Make sure we account for slave CRTCs when building the monitor list,
since that's what rrxinerama uses to fake Xinerama geometry.

[ajax: Slightly more informative commit message.]

Bugzilla: https://bugs.freedesktop.org/92313
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Jan Burgmeier 2016-02-04 14:06:43 +01:00 • committed by Adam Jackson
commit 7bb64d8c1d
2 changed files with 15 additions and 3 deletions

View file

@ -543,6 +543,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
WindowPtr pWin;
rrScrPrivPtr pScrPriv;
int ret;
ScreenPtr slave;
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
@ -565,8 +566,19 @@ ProcRRSetOutputPrimary(ClientPtr client)
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
if (pScrPriv)
{
RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
xorg_list_for_each_entry(slave,
&pWin->drawable.pScreen->output_slave_list,
output_head) {
rrScrPrivPtr pSlavePriv;
pSlavePriv = rrGetScrPriv(slave);
RRSetPrimaryOutput(slave, pSlavePriv, output);
}
}
return Success;
}