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:
parent
87d5534f70
commit
7bb64d8c1d
|
@ -326,7 +326,7 @@ RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret,
|
||||||
RRMonitorSetFromClient(pScrPriv->monitors[list.client_primary], mon);
|
RRMonitorSetFromClient(pScrPriv->monitors[list.client_primary], mon);
|
||||||
mon++;
|
mon++;
|
||||||
} else if (list.server_primary >= 0) {
|
} else if (list.server_primary >= 0) {
|
||||||
RRMonitorSetFromServer(pScrPriv->crtcs[list.server_primary], mon);
|
RRMonitorSetFromServer(list.server_crtc[list.server_primary], mon);
|
||||||
mon++;
|
mon++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,8 +354,8 @@ RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret,
|
||||||
|
|
||||||
/* And finish with the list of crtc-inspired monitors
|
/* And finish with the list of crtc-inspired monitors
|
||||||
*/
|
*/
|
||||||
for (c = 0; c < pScrPriv->numCrtcs; c++) {
|
for (c = 0; c < list.num_crtcs; c++) {
|
||||||
RRCrtcPtr crtc = pScrPriv->crtcs[c];
|
RRCrtcPtr crtc = list.server_crtc[c];
|
||||||
if (c == list.server_primary && list.client_primary < 0)
|
if (c == list.server_primary && list.client_primary < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -543,6 +543,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
int ret;
|
int ret;
|
||||||
|
ScreenPtr slave;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
|
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
|
||||||
|
|
||||||
|
@ -565,8 +566,19 @@ ProcRRSetOutputPrimary(ClientPtr client)
|
||||||
|
|
||||||
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
|
pScrPriv = rrGetScrPriv(pWin->drawable.pScreen);
|
||||||
if (pScrPriv)
|
if (pScrPriv)
|
||||||
|
{
|
||||||
RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output);
|
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;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue