aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrxinerama.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrxinerama.c')
-rw-r--r--xorg-server/randr/rrxinerama.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c
index 63e2a318b..86a19757b 100644
--- a/xorg-server/randr/rrxinerama.c
+++ b/xorg-server/randr/rrxinerama.c
@@ -156,6 +156,7 @@ static int
RRXineramaScreenCount(ScreenPtr pScreen)
{
int i, n;
+ ScreenPtr slave;
n = 0;
if (rrGetScrPriv(pScreen)) {
@@ -164,6 +165,15 @@ RRXineramaScreenCount(ScreenPtr pScreen)
if (RRXineramaCrtcActive(pScrPriv->crtcs[i]))
n++;
}
+
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ rrScrPrivPtr pSlavePriv;
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numCrtcs; i++)
+ if (RRXineramaCrtcActive(pSlavePriv->crtcs[i]))
+ n++;
+ }
+
return n;
}
@@ -307,6 +317,7 @@ ProcRRXineramaQueryScreens(ClientPtr client)
xXineramaQueryScreensReply rep;
ScreenPtr pScreen = screenInfo.screens[RR_XINERAMA_SCREEN];
int n = 0;
+ int i;
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
@@ -329,8 +340,8 @@ ProcRRXineramaQueryScreens(ClientPtr client)
WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
if (n) {
+ ScreenPtr slave;
rrScrPriv(pScreen);
- int i;
int has_primary = 0;
if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) {
@@ -346,6 +357,13 @@ ProcRRXineramaQueryScreens(ClientPtr client)
}
RRXineramaWriteCrtc(client, pScrPriv->crtcs[i]);
}
+
+ xorg_list_for_each_entry(slave, &pScreen->output_slave_list, output_head) {
+ rrScrPrivPtr pSlavePriv;
+ pSlavePriv = rrGetScrPriv(slave);
+ for (i = 0; i < pSlavePriv->numCrtcs; i++)
+ RRXineramaWriteCrtc(client, pSlavePriv->crtcs[i]);
+ }
}
return Success;