summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-03-23 15:30:06 +1000
committerDave Airlie <airlied@redhat.com>2011-03-23 15:46:22 +1000
commit92f9f2ab845c280aaaf162ac4380af0a11e202cf (patch)
tree21004c47ec1fb9d3a46090354f548c63d9b34da8
parent8fef0ec4905bcb3cc1daaafaaba2b05dad95f90d (diff)
panoramiX: use protocol screen to represent xinerama configuration.proto-screens
This sets up xinerama to use the protocol screen 0, it changes everywhere that direct reference screens 0. It also drops panoramiXNumScreens, as this is now stored in the protocol screen struct. I think there are further cleanups that could happen now. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--Xext/panoramiX.c96
-rw-r--r--Xext/panoramiX.h7
-rw-r--r--Xext/panoramiXprocs.c132
-rw-r--r--Xext/panoramiXsrv.h1
-rw-r--r--Xext/saver.c2
-rw-r--r--Xext/shm.c18
-rw-r--r--Xext/xvdisp.c20
-rw-r--r--composite/compext.c6
-rw-r--r--dix/dispatch.c38
-rw-r--r--dix/events.c136
-rw-r--r--dix/getevents.c4
-rw-r--r--dix/window.c12
-rw-r--r--hw/dmx/dmx.c2
-rw-r--r--hw/dmx/dmxcb.c3
-rw-r--r--include/screenint.h1
-rw-r--r--mi/miexpose.c6
-rw-r--r--record/record.c8
-rw-r--r--render/render.c44
18 files changed, 291 insertions, 245 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 00afe94f1..87829d120 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -74,7 +74,6 @@ extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
int PanoramiXPixWidth = 0;
int PanoramiXPixHeight = 0;
-int PanoramiXNumScreens = 0;
static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
@@ -388,16 +387,19 @@ XineramaRegisterConnectionBlockCallback(void (*func)(void))
return TRUE;
}
-static void XineramaInitData(ScreenPtr pScreen)
+static void XineramaInitData(void)
{
int i, w, h;
+ ProtocolScreenPtr protoscr;
+ ScreenPtr pScreen;
+ protoscr = screenInfo.protocolScreens[0];
RegionNull(&PanoramiXScreenRegion);
FOR_NSCREENS(i) {
BoxRec TheBox;
RegionRec ScreenRegion;
- pScreen = screenInfo.screens[i];
+ pScreen = protoscr->pScreens[i];
TheBox.x1 = pScreen->x;
TheBox.x2 = TheBox.x1 + pScreen->width;
@@ -410,11 +412,11 @@ static void XineramaInitData(ScreenPtr pScreen)
RegionUninit(&ScreenRegion);
}
- PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width;
- PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height;
+ PanoramiXPixWidth = protoscr->pScreens[0]->x + protoscr->pScreens[0]->width;
+ PanoramiXPixHeight = protoscr->pScreens[0]->y + protoscr->pScreens[0]->height;
FOR_NSCREENS_FORWARD_SKIP(i) {
- pScreen = screenInfo.screens[i];
+ pScreen = protoscr->pScreens[i];
w = pScreen->x + pScreen->width;
h = pScreen->y + pScreen->height;
@@ -428,7 +430,7 @@ static void XineramaInitData(ScreenPtr pScreen)
void XineramaReinitData(ScreenPtr pScreen)
{
RegionUninit(&PanoramiXScreenRegion);
- XineramaInitData(pScreen);
+ XineramaInitData();
}
/*
@@ -443,8 +445,9 @@ void PanoramiXExtensionInit(int argc, char *argv[])
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
- ScreenPtr pScreen = screenInfo.screens[0];
+ ScreenPtr pScreen;
PanoramiXScreenPtr pScreenPriv;
+ int num_screens = 0;
if (noPanoramiXExtension)
return;
@@ -459,12 +462,20 @@ void PanoramiXExtensionInit(int argc, char *argv[])
return;
}
- PanoramiXNumScreens = screenInfo.numScreens;
- if (PanoramiXNumScreens == 1) { /* Only 1 screen */
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]->internalOnly)
+ continue;
+ num_screens++;
+ }
+
+ if (num_screens == 1) { /* Only 1 screen */
noPanoramiXExtension = TRUE;
return;
}
+ if(!SetupXineramaProtocolScreens())
+ FatalError("setting up xinerama protocol screens");
+
while (panoramiXGeneration != serverGeneration) {
extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0,
ProcPanoramiXDispatch,
@@ -479,7 +490,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
*/
FOR_NSCREENS(i) {
- pScreen = screenInfo.screens[i];
+ pScreen = screenInfo.protocolScreens[0]->pScreens[i];
pScreenPriv = malloc(sizeof(PanoramiXScreenRec));
dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey,
pScreenPriv);
@@ -525,7 +536,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
return;
}
- XineramaInitData(pScreen);
+ XineramaInitData();
/*
* Put our processes into the ProcVector
@@ -619,32 +630,28 @@ Bool PanoramiXCreateConnectionBlock(void)
return FALSE;
}
- for(i = 1; i < screenInfo.numScreens; i++) {
- pScreen = screenInfo.screens[i];
- if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) {
+ for(i = 1; i < screenInfo.protocolScreens[0]->numScreens; i++) {
+ pScreen = screenInfo.protocolScreens[0]->pScreens[i];
+ if(pScreen->rootDepth != screenInfo.protocolScreens[0]->pScreens[0]->rootDepth) {
ErrorF("Xinerama error: Root window depths differ\n");
return FALSE;
}
- if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
+ if(pScreen->backingStoreSupport != screenInfo.protocolScreens[0]->pScreens[0]->backingStoreSupport)
disableBackingStore = TRUE;
}
if (disableBackingStore) {
- for (i = 0; i < screenInfo.numScreens; i++) {
- pScreen = screenInfo.screens[i];
+ for (i = 0; i < screenInfo.protocolScreens[0]->numScreens; i++) {
+ pScreen = screenInfo.protocolScreens[0]->pScreens[i];
pScreen->backingStoreSupport = NotUseful;
}
}
- i = screenInfo.numScreens;
- screenInfo.numScreens = 1;
+ /* no need to forge this now */
if (!CreateConnectionBlock()) {
- screenInfo.numScreens = i;
return FALSE;
}
- screenInfo.numScreens = i;
-
root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart);
length = connBlockScreenStart + sizeof(xWindowRoot);
@@ -741,7 +748,7 @@ PanoramiXMaybeAddDepth(DepthPtr pDepth)
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
- pScreen = screenInfo.screens[j];
+ pScreen = screenInfo.protocolScreens[0]->pScreens[j];
for (k = 0; k < pScreen->numDepths; k++) {
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
found = TRUE;
@@ -774,7 +781,7 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual)
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
- pScreen = screenInfo.screens[j];
+ pScreen = screenInfo.protocolScreens[0]->pScreens[j];
found = FALSE;
for (k = 0; k < pScreen->numVisuals; k++) {
@@ -782,7 +789,7 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual)
if ((*XineramaVisualsEqualPtr)(pVisual, pScreen, candidate)
#ifdef GLXPROXY
- && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen)
+ && glxMatchVisual(screenInfo.protocolScreens[0]->pScreens[0], pVisual, pScreen)
#endif
) {
found = TRUE;
@@ -816,7 +823,7 @@ PanoramiXConsolidate(void)
{
int i;
PanoramiXRes *root, *defmap, *saver;
- ScreenPtr pScreen = screenInfo.screens[0];
+ ScreenPtr pScreen = screenInfo.protocolScreens[0]->pScreens[0];
DepthPtr pDepth = pScreen->allowedDepths;
VisualPtr pVisual = pScreen->visuals;
@@ -837,7 +844,7 @@ PanoramiXConsolidate(void)
saver->type = XRT_WINDOW;
FOR_NSCREENS(i) {
- ScreenPtr pScreen = screenInfo.screens[i];
+ ScreenPtr pScreen = screenInfo.protocolScreens[0]->pScreens[i];
root->info[i].id = pScreen->root->drawable.id;
root->u.win.class = InputOutput;
root->u.win.root = TRUE;
@@ -855,7 +862,7 @@ PanoramiXConsolidate(void)
VisualID
PanoramiXTranslateVisualID(int screen, VisualID orig)
{
- ScreenPtr pOtherScreen = screenInfo.screens[screen];
+ ScreenPtr pOtherScreen = screenInfo.protocolScreens[0]->pScreens[screen];
VisualPtr pVisual = NULL;
int i;
@@ -898,7 +905,6 @@ static void PanoramiXResetProc(ExtensionEntry* extEntry)
#ifdef XFIXES
PanoramiXFixesReset ();
#endif
- screenInfo.numScreens = PanoramiXNumScreens;
for (i = 256; i--; )
ProcVector[i] = SavedProcVector[i];
}
@@ -971,7 +977,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- rep.ScreenCount = PanoramiXNumScreens;
+ rep.ScreenCount = screenInfo.protocolScreens[0]->numScreens;
rep.window = stuff->window;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
@@ -990,7 +996,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int n, rc;
- if (stuff->screen >= PanoramiXNumScreens)
+ if (stuff->screen >= screenInfo.protocolScreens[0]->numScreens)
return BadMatch;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
@@ -1002,8 +1008,8 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
rep.length = 0;
rep.sequenceNumber = client->sequence;
/* screen dimensions */
- rep.width = screenInfo.screens[stuff->screen]->width;
- rep.height = screenInfo.screens[stuff->screen]->height;
+ rep.width = screenInfo.protocolScreens[0]->pScreens[stuff->screen]->width;
+ rep.height = screenInfo.protocolScreens[0]->pScreens[stuff->screen]->height;
rep.window = stuff->window;
rep.screen = stuff->screen;
if (client->swapped) {
@@ -1060,7 +1066,7 @@ ProcXineramaQueryScreens(ClientPtr client)
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
+ rep.number = (noPanoramiXExtension) ? 0 : screenInfo.protocolScreens[0]->numScreens;
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
if (client->swapped) {
int n;
@@ -1075,10 +1081,10 @@ ProcXineramaQueryScreens(ClientPtr client)
int i;
FOR_NSCREENS(i) {
- scratch.x_org = screenInfo.screens[i]->x;
- scratch.y_org = screenInfo.screens[i]->y;
- scratch.width = screenInfo.screens[i]->width;
- scratch.height = screenInfo.screens[i]->height;
+ scratch.x_org = screenInfo.protocolScreens[0]->pScreens[i]->x;
+ scratch.y_org = screenInfo.protocolScreens[0]->pScreens[i]->y;
+ scratch.width = screenInfo.protocolScreens[0]->pScreens[i]->width;
+ scratch.height = screenInfo.protocolScreens[0]->pScreens[i]->height;
if(client->swapped) {
int n;
@@ -1168,8 +1174,8 @@ XineramaGetImageData(
SrcBox.x1 = left;
SrcBox.y1 = top;
if(!isRoot) {
- SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x;
- SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y;
+ SrcBox.x1 += pDraw->x + screenInfo.protocolScreens[0]->pScreens[0]->x;
+ SrcBox.y1 += pDraw->y + screenInfo.protocolScreens[0]->pScreens[0]->y;
}
SrcBox.x2 = SrcBox.x1 + width;
SrcBox.y2 = SrcBox.y1 + height;
@@ -1198,8 +1204,8 @@ XineramaGetImageData(
if(inOut == rgnIN) {
(*pScreen->GetImage)(pDraw,
- SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x,
- SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y,
+ SrcBox.x1 - pDraw->x - screenInfo.protocolScreens[0]->pScreens[i]->x,
+ SrcBox.y1 - pDraw->y - screenInfo.protocolScreens[0]->pScreens[i]->y,
width, height, format, planemask, data);
break;
} else if (inOut == rgnOUT)
@@ -1227,8 +1233,8 @@ XineramaGetImageData(
}
}
- x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x;
- y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y;
+ x = pbox->x1 - pDraw->x - screenInfo.protocolScreens[0]->pScreens[i]->x;
+ y = pbox->y1 - pDraw->y - screenInfo.protocolScreens[0]->pScreens[i]->y;
(*pScreen->GetImage)(pDraw, x, y, w, h,
format, planemask, ScratchMem);
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h
index 71651e558..ebc3d98d7 100644
--- a/Xext/panoramiX.h
+++ b/Xext/panoramiX.h
@@ -45,6 +45,7 @@ Equipment Corporation.
#undef _PANORAMIX_SERVER
#include "gcstruct.h"
#include "dixstruct.h"
+#include "scrnintstr.h"
typedef struct _PanoramiXInfo {
XID id ;
@@ -69,9 +70,9 @@ typedef struct {
} u;
} PanoramiXRes;
-#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
-#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++)
-#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
+#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < screenInfo.protocolScreens[0]->numScreens; j++)
+#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < screenInfo.protocolScreens[0]->numScreens; j++)
+#define FOR_NSCREENS_BACKWARD(j) for(j = screenInfo.protocolScreens[0]->numScreens - 1; j >= 0; j--)
#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 9ea461173..88afcab86 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -127,14 +127,14 @@ int PanoramiXCreateWindow(ClientPtr client)
orig_visual = stuff->visual;
orig_x = stuff->x;
orig_y = stuff->y;
- parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
- (stuff->parent == screenInfo.screens[0]->screensaver.wid);
+ parentIsRoot = (stuff->parent == screenInfo.protocolScreens[0]->pScreens[0]->root->drawable.id) ||
+ (stuff->parent == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid);
FOR_NSCREENS_BACKWARD(j) {
stuff->wid = newWin->info[j].id;
stuff->parent = parent->info[j].id;
if (parentIsRoot) {
- stuff->x = orig_x - screenInfo.screens[j]->x;
- stuff->y = orig_y - screenInfo.screens[j]->y;
+ stuff->x = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
if (backPix)
*((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id;
@@ -326,14 +326,14 @@ int PanoramiXReparentWindow(ClientPtr client)
x = stuff->x;
y = stuff->y;
- parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
- (stuff->parent == screenInfo.screens[0]->screensaver.wid);
+ parentIsRoot = (stuff->parent == screenInfo.protocolScreens[0]->pScreens[0]->root->drawable.id) ||
+ (stuff->parent == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid);
FOR_NSCREENS_BACKWARD(j) {
stuff->window = win->info[j].id;
stuff->parent = parent->info[j].id;
if(parentIsRoot) {
- stuff->x = x - screenInfo.screens[j]->x;
- stuff->y = y - screenInfo.screens[j]->y;
+ stuff->x = x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_ReparentWindow])(client);
if(result != Success) break;
@@ -473,8 +473,8 @@ int PanoramiXConfigureWindow(ClientPtr client)
}
}
- if(pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) ||
- (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)))
+ if(pWin->parent && ((pWin->parent == screenInfo.protocolScreens[0]->pScreens[0]->root) ||
+ (pWin->parent->drawable.id == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid)))
{
if ((Mask)stuff->mask & CWX) {
x_offset = 0;
@@ -493,9 +493,9 @@ int PanoramiXConfigureWindow(ClientPtr client)
if(sib)
*((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id;
if(x_offset >= 0)
- *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x;
+ *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.protocolScreens[0]->pScreens[j]->x;
if(y_offset >= 0)
- *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y;
+ *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.protocolScreens[0]->pScreens[j]->y;
result = (*SavedProcVector[X_ConfigureWindow])(client);
if(result != Success) break;
}
@@ -542,7 +542,7 @@ int PanoramiXGetGeometry(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- rep.root = screenInfo.screens[0]->root->drawable.id;
+ rep.root = screenInfo.protocolScreens[0]->pScreens[0]->root->drawable.id;
rep.depth = pDraw->depth;
rep.width = pDraw->width;
rep.height = pDraw->height;
@@ -560,11 +560,11 @@ int PanoramiXGetGeometry(ClientPtr client)
WindowPtr pWin = (WindowPtr)pDraw;
rep.x = pWin->origin.x - wBorderWidth (pWin);
rep.y = pWin->origin.y - wBorderWidth (pWin);
- if((pWin->parent == screenInfo.screens[0]->root) ||
- (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
+ if((pWin->parent == screenInfo.protocolScreens[0]->pScreens[0]->root) ||
+ (pWin->parent->drawable.id == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid))
{
- rep.x += screenInfo.screens[0]->x;
- rep.y += screenInfo.screens[0]->y;
+ rep.x += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ rep.y += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
rep.borderWidth = pWin->borderWidth;
}
@@ -594,11 +594,11 @@ int PanoramiXTranslateCoords(ClientPtr client)
rep.sameScreen = xTrue;
rep.child = None;
- if((pWin == screenInfo.screens[0]->root) ||
- (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
+ if((pWin == screenInfo.protocolScreens[0]->pScreens[0]->root) ||
+ (pWin->drawable.id == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid))
{
- x = stuff->srcX - screenInfo.screens[0]->x;
- y = stuff->srcY - screenInfo.screens[0]->y;
+ x = stuff->srcX - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ y = stuff->srcY - screenInfo.protocolScreens[0]->pScreens[0]->y;
} else {
x = pWin->drawable.x + stuff->srcX;
y = pWin->drawable.y + stuff->srcY;
@@ -631,11 +631,11 @@ int PanoramiXTranslateCoords(ClientPtr client)
}
rep.dstX = x - pDst->drawable.x;
rep.dstY = y - pDst->drawable.y;
- if((pDst == screenInfo.screens[0]->root) ||
- (pDst->drawable.id == screenInfo.screens[0]->screensaver.wid))
+ if((pDst == screenInfo.protocolScreens[0]->pScreens[0]->root) ||
+ (pDst->drawable.id == screenInfo.protocolScreens[0]->pScreens[0]->screensaver.wid))
{
- rep.dstX += screenInfo.screens[0]->x;
- rep.dstY += screenInfo.screens[0]->y;
+ rep.dstX += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ rep.dstY += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep);
@@ -974,8 +974,8 @@ int PanoramiXClearToBackground(ClientPtr client)
FOR_NSCREENS_BACKWARD(j) {
stuff->window = win->info[j].id;
if(isRoot) {
- stuff->x = x - screenInfo.screens[j]->x;
- stuff->y = y - screenInfo.screens[j]->y;
+ stuff->x = x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_ClearArea])(client);
if(result != Success) break;
@@ -1087,12 +1087,12 @@ int PanoramiXCopyArea(ClientPtr client)
stuff->srcDrawable = src->info[j].id;
stuff->gc = gc->info[j].id;
if (srcIsRoot) {
- stuff->srcX = srcx - screenInfo.screens[j]->x;
- stuff->srcY = srcy - screenInfo.screens[j]->y;
+ stuff->srcX = srcx - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->srcY = srcy - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
if (dstIsRoot) {
- stuff->dstX = dstx - screenInfo.screens[j]->x;
- stuff->dstY = dsty - screenInfo.screens[j]->y;
+ stuff->dstX = dstx - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->dstY = dsty - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
@@ -1118,7 +1118,7 @@ int PanoramiXCopyArea(ClientPtr client)
if(pGC->graphicsExposures && pRgn) {
if(srcIsRoot) {
RegionTranslate(pRgn,
- screenInfo.screens[j]->x, screenInfo.screens[j]->y);
+ screenInfo.protocolScreens[0]->pScreens[j]->x, screenInfo.protocolScreens[0]->pScreens[j]->y);
}
RegionAppend(&totalReg, pRgn);
RegionDestroy(pRgn);
@@ -1192,12 +1192,12 @@ int PanoramiXCopyPlane(ClientPtr client)
stuff->srcDrawable = src->info[j].id;
stuff->gc = gc->info[j].id;
if (srcIsRoot) {
- stuff->srcX = srcx - screenInfo.screens[j]->x;
- stuff->srcY = srcy - screenInfo.screens[j]->y;
+ stuff->srcX = srcx - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->srcY = srcy - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
if (dstIsRoot) {
- stuff->dstX = dstx - screenInfo.screens[j]->x;
- stuff->dstY = dsty - screenInfo.screens[j]->y;
+ stuff->dstX = dstx - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->dstY = dsty - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess);
@@ -1278,8 +1278,8 @@ int PanoramiXPolyPoint(ClientPtr client)
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xPoint *pnts = (xPoint*)&stuff[1];
@@ -1338,8 +1338,8 @@ int PanoramiXPolyLine(ClientPtr client)
if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xPoint *pnts = (xPoint*)&stuff[1];
@@ -1401,8 +1401,8 @@ int PanoramiXPolySegment(ClientPtr client)
if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xSegment *segs = (xSegment*)&stuff[1];
@@ -1464,8 +1464,8 @@ int PanoramiXPolyRectangle(ClientPtr client)
if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
@@ -1526,8 +1526,8 @@ int PanoramiXPolyArc(ClientPtr client)
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xArc *arcs = (xArc *) &stuff[1];
@@ -1584,8 +1584,8 @@ int PanoramiXFillPoly(ClientPtr client)
if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
DDXPointPtr pnts = (DDXPointPtr)&stuff[1];
@@ -1647,8 +1647,8 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xRectangle *rects = (xRectangle *) &stuff[1];
@@ -1708,8 +1708,8 @@ int PanoramiXPolyFillArc(ClientPtr client)
if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc));
if (isRoot) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xArc *arcs = (xArc *) &stuff[1];
@@ -1761,8 +1761,8 @@ int PanoramiXPutImage(ClientPtr client)
orig_y = stuff->dstY;
FOR_NSCREENS_BACKWARD(j){
if (isRoot) {
- stuff->dstX = orig_x - screenInfo.screens[j]->x;
- stuff->dstY = orig_y - screenInfo.screens[j]->y;
+ stuff->dstX = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->dstY = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
@@ -1827,10 +1827,10 @@ int PanoramiXGetImage(ClientPtr client)
return BadMatch;
} else {
if( /* check for being onscreen */
- screenInfo.screens[0]->x + pDraw->x + x < 0 ||
- screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
- screenInfo.screens[0]->y + pDraw->y + y < 0 ||
- screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
+ screenInfo.protocolScreens[0]->pScreens[0]->x + pDraw->x + x < 0 ||
+ screenInfo.protocolScreens[0]->pScreens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
+ screenInfo.protocolScreens[0]->pScreens[0]->y + pDraw->y + y < 0 ||
+ screenInfo.protocolScreens[0]->pScreens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
/* check for being inside of border */
x < - wBorderWidth((WindowPtr)pDraw) ||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
@@ -1964,8 +1964,8 @@ PanoramiXPolyText8(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->x = orig_x - screenInfo.screens[j]->x;
- stuff->y = orig_y - screenInfo.screens[j]->y;
+ stuff->x = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_PolyText8])(client);
if(result != Success) break;
@@ -2005,8 +2005,8 @@ PanoramiXPolyText16(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->x = orig_x - screenInfo.screens[j]->x;
- stuff->y = orig_y - screenInfo.screens[j]->y;
+ stuff->x = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_PolyText16])(client);
if(result != Success) break;
@@ -2046,8 +2046,8 @@ int PanoramiXImageText8(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->x = orig_x - screenInfo.screens[j]->x;
- stuff->y = orig_y - screenInfo.screens[j]->y;
+ stuff->x = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_ImageText8])(client);
if(result != Success) break;
@@ -2087,8 +2087,8 @@ int PanoramiXImageText16(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->x = orig_x - screenInfo.screens[j]->x;
- stuff->y = orig_y - screenInfo.screens[j]->y;
+ stuff->x = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->y = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*SavedProcVector[X_ImageText16])(client);
if(result != Success) break;
diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h
index 6fc903b88..b4629479f 100644
--- a/Xext/panoramiXsrv.h
+++ b/Xext/panoramiXsrv.h
@@ -8,7 +8,6 @@
#include "panoramiX.h"
-extern _X_EXPORT int PanoramiXNumScreens;
extern _X_EXPORT int PanoramiXPixWidth;
extern _X_EXPORT int PanoramiXPixHeight;
diff --git a/Xext/saver.c b/Xext/saver.c
index 18886038a..dd7427076 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1288,7 +1288,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client)
if (rc != Success)
return (rc == BadValue) ? BadDrawable : rc;
- for(i = PanoramiXNumScreens - 1; i > 0; i--) {
+ for(i = screenInfo.protocolScreens[0]->numScreens - 1; i > 0; i--) {
stuff->drawable = draw->info[i].id;
ScreenSaverUnsetAttributes(client);
}
diff --git a/Xext/shm.c b/Xext/shm.c
index b08af821b..a8f7fe4a8 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -769,8 +769,8 @@ ProcPanoramiXShmPutImage(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->dstX = orig_x - screenInfo.screens[j]->x;
- stuff->dstY = orig_y - screenInfo.screens[j]->y;
+ stuff->dstX = orig_x - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->dstY = orig_y - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = ProcShmPutImage(client);
if(result != Success) break;
@@ -790,6 +790,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
Mask plane = 0, planemask;
long lenPer = 0, length, widthBytesLine;
Bool isRoot;
+ int num_screens;
REQUEST(xShmGetImageReq);
@@ -831,10 +832,10 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return BadMatch;
} else {
if( /* check for being onscreen */
- screenInfo.screens[0]->x + pDraw->x + x < 0 ||
- screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
- screenInfo.screens[0]->y + pDraw->y + y < 0 ||
- screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
+ screenInfo.protocolScreens[0]->pScreens[0]->x + pDraw->x + x < 0 ||
+ screenInfo.protocolScreens[0]->pScreens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
+ screenInfo.protocolScreens[0]->pScreens[0]->y + pDraw->y + y < 0 ||
+ screenInfo.protocolScreens[0]->pScreens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
/* check for being inside of border */
x < - wBorderWidth((WindowPtr)pDraw) ||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
@@ -843,7 +844,8 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return BadMatch;
}
- drawables = calloc(PanoramiXNumScreens, sizeof(DrawablePtr));
+ num_screens = screenInfo.protocolScreens[0]->numScreens;
+ drawables = calloc(num_screens, sizeof(DrawablePtr));
if(!drawables)
return BadAlloc;
@@ -978,7 +980,7 @@ CreatePmap:
FOR_NSCREENS(j) {
ShmScrPrivateRec *screen_priv;
- pScreen = screenInfo.screens[j];
+ pScreen = screenInfo.protocolScreens[0]->pScreens[j];
screen_priv = ShmGetScreenPriv(pScreen);
pMap = (*screen_priv->shmFuncs->CreatePixmap)(pScreen,
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index b96843159..4f955ab2e 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1690,8 +1690,8 @@ XineramaXvShmPutImage(ClientPtr client)
stuff->drw_x = x;
stuff->drw_y = y;
if(isRoot) {
- stuff->drw_x -= screenInfo.screens[i]->x;
- stuff->drw_y -= screenInfo.screens[i]->y;
+ stuff->drw_x -= screenInfo.protocolScreens[0]->pScreens[i]->x;
+ stuff->drw_y -= screenInfo.protocolScreens[0]->pScreens[i]->y;
}
stuff->send_event = (send_event && !i) ? 1 : 0;
@@ -1742,8 +1742,8 @@ XineramaXvPutImage(ClientPtr client)
stuff->drw_x = x;
stuff->drw_y = y;
if(isRoot) {
- stuff->drw_x -= screenInfo.screens[i]->x;
- stuff->drw_y -= screenInfo.screens[i]->y;
+ stuff->drw_x -= screenInfo.protocolScreens[0]->pScreens[i]->x;
+ stuff->drw_y -= screenInfo.protocolScreens[0]->pScreens[i]->y;
}
result = ProcXvPutImage(client);
@@ -1790,8 +1790,8 @@ XineramaXvPutVideo(ClientPtr client)
stuff->drw_x = x;
stuff->drw_y = y;
if(isRoot) {
- stuff->drw_x -= screenInfo.screens[i]->x;
- stuff->drw_y -= screenInfo.screens[i]->y;
+ stuff->drw_x -= screenInfo.protocolScreens[0]->pScreens[i]->x;
+ stuff->drw_y -= screenInfo.protocolScreens[0]->pScreens[i]->y;
}
result = ProcXvPutVideo(client);
@@ -1838,8 +1838,8 @@ XineramaXvPutStill(ClientPtr client)
stuff->drw_x = x;
stuff->drw_y = y;
if(isRoot) {
- stuff->drw_x -= screenInfo.screens[i]->x;
- stuff->drw_y -= screenInfo.screens[i]->y;
+ stuff->drw_x -= screenInfo.protocolScreens[0]->pScreens[i]->x;
+ stuff->drw_y -= screenInfo.protocolScreens[0]->pScreens[i]->y;
}
result = ProcXvPutStill(client);
@@ -1902,7 +1902,7 @@ matchAdaptor(ScreenPtr pScreen, XvAdaptorPtr refAdapt, Bool isOverlay)
void XineramifyXv(void)
{
- XvScreenPtr xvsp0 = dixLookupPrivate(&screenInfo.screens[0]->devPrivates, XvGetScreenKey());
+ XvScreenPtr xvsp0 = dixLookupPrivate(&screenInfo.protocolScreens[0]->pScreens[0]->devPrivates, XvGetScreenKey());
XvAdaptorPtr MatchingAdaptors[MAXSCREENS];
int i, j, k;
@@ -1919,7 +1919,7 @@ void XineramifyXv(void)
MatchingAdaptors[0] = refAdapt;
isOverlay = hasOverlay(refAdapt);
FOR_NSCREENS_FORWARD_SKIP(j)
- MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay);
+ MatchingAdaptors[j] = matchAdaptor(screenInfo.protocolScreens[0]->pScreens[j], refAdapt, isOverlay);
/* now create a resource for each port */
for(j = 0; j < refAdapt->nPorts; j++) {
diff --git a/composite/compext.c b/composite/compext.c
index e0d8e75e4..743e03e8b 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -770,7 +770,7 @@ PanoramiXCompositeGetOverlayWindow (ClientPtr client)
return rc;
}
- cs = GetCompScreen(screenInfo.screens[0]);
+ cs = GetCompScreen(screenInfo.protocolScreens[0]->pScreens[0]);
if (!cs->pOverlayWin)
{
if(!(overlayWin = malloc(sizeof(PanoramiXRes))))
@@ -823,14 +823,14 @@ PanoramiXCompositeGetOverlayWindow (ClientPtr client)
if (overlayWin)
{
FOR_NSCREENS(i) {
- cs = GetCompScreen(screenInfo.screens[i]);
+ cs = GetCompScreen(screenInfo.protocolScreens[0]->pScreens[i]);
overlayWin->info[i].id = cs->pOverlayWin->drawable.id;
}
AddResource(overlayWin->info[0].id, XRT_WINDOW, overlayWin);
}
- cs = GetCompScreen(screenInfo.screens[0]);
+ cs = GetCompScreen(screenInfo.protocolScreens[0]->pScreens[0]);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
diff --git a/dix/dispatch.c b/dix/dispatch.c
index d4bbb9e85..3a13d269a 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3938,3 +3938,41 @@ SetupProtocolScreens(void)
screenInfo.numProtocolScreens = j;
return TRUE;
}
+
+Bool
+SetupXineramaProtocolScreens(void)
+{
+ int i, j;
+ int n_scr = 0;
+
+ /* get count */
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]->internalOnly == FALSE)
+ n_scr++;
+ }
+
+ /* free all the protocol screens and reset them up */
+ for (i = 0; i < screenInfo.numProtocolScreens; i++) {
+ free(screenInfo.protocolScreens[i]);
+ screenInfo.protocolScreens[i] = NULL;
+ }
+
+ screenInfo.protocolScreens[0] = calloc(1, sizeof(ProtocolScreenRec) + sizeof(ScreenPtr) * n_scr);
+ if (!screenInfo.protocolScreens[0])
+ return FALSE;
+
+ screenInfo.protocolScreens[0]->pScreens = (ScreenPtr *)((char *)screenInfo.protocolScreens[0] + sizeof(ProtocolScreenRec));
+
+ j = 0;
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (screenInfo.screens[i]->internalOnly == TRUE)
+ continue;
+
+ screenInfo.protocolScreens[0]->pScreens[j] = screenInfo.screens[i];
+ j++;
+ }
+ screenInfo.protocolScreens[0]->numScreens = n_scr;
+
+ screenInfo.numProtocolScreens = 1;
+ return TRUE;
+}
diff --git a/dix/events.c b/dix/events.c
index b5fba9892..81c9f411c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -503,8 +503,8 @@ XineramaSetCursorPosition(
that screen are. */
pScreen = pSprite->screen;
- x += screenInfo.screens[0]->x;
- y += screenInfo.screens[0]->y;
+ x += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ y += screenInfo.protocolScreens[0]->pScreens[0]->y;
if(!pointOnScreen(pScreen, x, y))
{
@@ -512,17 +512,17 @@ XineramaSetCursorPosition(
{
if(i == pScreen->myNum)
continue;
- if(pointOnScreen(screenInfo.screens[i], x, y))
+ if(pointOnScreen(screenInfo.protocolScreens[0]->pScreens[i], x, y))
{
- pScreen = screenInfo.screens[i];
+ pScreen = screenInfo.protocolScreens[0]->pScreens[i];
break;
}
}
}
pSprite->screen = pScreen;
- pSprite->hotPhys.x = x - screenInfo.screens[0]->x;
- pSprite->hotPhys.y = y - screenInfo.screens[0]->y;
+ pSprite->hotPhys.x = x - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotPhys.y = y - screenInfo.protocolScreens[0]->pScreens[0]->y;
x -= pScreen->x;
y -= pScreen->y;
@@ -542,10 +542,10 @@ XineramaConstrainCursor(DeviceIntPtr pDev)
/* Translate the constraining box to the screen
the sprite is actually on */
- newBox.x1 += screenInfo.screens[0]->x - pScreen->x;
- newBox.x2 += screenInfo.screens[0]->x - pScreen->x;
- newBox.y1 += screenInfo.screens[0]->y - pScreen->y;
- newBox.y2 += screenInfo.screens[0]->y - pScreen->y;
+ newBox.x1 += screenInfo.protocolScreens[0]->pScreens[0]->x - pScreen->x;
+ newBox.x2 += screenInfo.protocolScreens[0]->pScreens[0]->x - pScreen->x;
+ newBox.y1 += screenInfo.protocolScreens[0]->pScreens[0]->y - pScreen->y;
+ newBox.y2 += screenInfo.protocolScreens[0]->pScreens[0]->y - pScreen->y;
(* pScreen->ConstrainCursor)(pDev, pScreen, &newBox);
}
@@ -556,10 +556,10 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
{
SpritePtr pSprite = pDev->spriteInfo->sprite;
- if(pWin == screenInfo.screens[0]->root) {
+ if(pWin == screenInfo.protocolScreens[0]->pScreens[0]->root) {
int i;
FOR_NSCREENS(i)
- pSprite->windows[i] = screenInfo.screens[i]->root;
+ pSprite->windows[i] = screenInfo.protocolScreens[0]->pScreens[i]->root;
} else {
PanoramiXRes *win;
int rc, i;
@@ -591,16 +591,16 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
if(!XineramaSetWindowPntrs(pDev, pWin))
return;
- i = PanoramiXNumScreens - 1;
+ i = screenInfo.protocolScreens[0]->numScreens - 1;
RegionCopy(&pSprite->Reg1,
&pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
+ off_x = screenInfo.protocolScreens[0]->pScreens[i]->x;
+ off_y = screenInfo.protocolScreens[0]->pScreens[i]->y;
while(i--) {
- x = off_x - screenInfo.screens[i]->x;
- y = off_y - screenInfo.screens[i]->y;
+ x = off_x - screenInfo.protocolScreens[0]->pScreens[i]->x;
+ y = off_y - screenInfo.protocolScreens[0]->pScreens[i]->y;
if(x || y)
RegionTranslate(&pSprite->Reg1, x, y);
@@ -608,8 +608,8 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
RegionUnion(&pSprite->Reg1, &pSprite->Reg1,
&pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
+ off_x = screenInfo.protocolScreens[0]->pScreens[i]->x;
+ off_y = screenInfo.protocolScreens[0]->pScreens[i]->y;
}
pSprite->hotLimits = *RegionExtents(&pSprite->Reg1);
@@ -620,7 +620,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
pSprite->hotShape = NullRegion;
pSprite->confined = FALSE;
- pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
+ pSprite->confineWin = (pWin == screenInfo.protocolScreens[0]->pScreens[0]->root) ? NullWindow : pWin;
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
}
@@ -810,16 +810,16 @@ CheckVirtualMotion(
if(!XineramaSetWindowPntrs(pDev, pWin))
return;
- i = PanoramiXNumScreens - 1;
+ i = screenInfo.protocolScreens[0]->numScreens - 1;
RegionCopy(&pSprite->Reg2,
&pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
+ off_x = screenInfo.protocolScreens[0]->pScreens[i]->x;
+ off_y = screenInfo.protocolScreens[0]->pScreens[i]->y;
while(i--) {
- x = off_x - screenInfo.screens[i]->x;
- y = off_y - screenInfo.screens[i]->y;
+ x = off_x - screenInfo.protocolScreens[0]->pScreens[i]->x;
+ y = off_y - screenInfo.protocolScreens[0]->pScreens[i]->y;
if(x || y)
RegionTranslate(&pSprite->Reg2, x, y);
@@ -827,8 +827,8 @@ CheckVirtualMotion(
RegionUnion(&pSprite->Reg2, &pSprite->Reg2,
&pSprite->windows[i]->borderSize);
- off_x = screenInfo.screens[i]->x;
- off_y = screenInfo.screens[i]->y;
+ off_x = screenInfo.protocolScreens[0]->pScreens[i]->x;
+ off_y = screenInfo.protocolScreens[0]->pScreens[i]->y;
}
} else
#endif
@@ -1134,8 +1134,8 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
{
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
- event->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
- event->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+ event->root_x += pSprite->screen->x - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ event->root_y += pSprite->screen->y - screenInfo.protocolScreens[0]->pScreens[0]->y;
}
#endif
pSprite->hotPhys.x = event->root_x;
@@ -1215,9 +1215,9 @@ PlayReleasedEvents(void)
case ET_KeyRelease:
case ET_ProximityIn:
case ET_ProximityOut:
- ev->root_x += screenInfo.screens[0]->x -
+ ev->root_x += screenInfo.protocolScreens[0]->pScreens[0]->x -
pDev->spriteInfo->sprite->screen->x;
- ev->root_y += screenInfo.screens[0]->y -
+ ev->root_y += screenInfo.protocolScreens[0]->pScreens[0]->y -
pDev->spriteInfo->sprite->screen->y;
break;
default:
@@ -2556,8 +2556,8 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
FOR_NSCREENS_FORWARD_SKIP(i) {
if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
- x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
- y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
+ x + screenInfo.protocolScreens[0]->pScreens[0]->x - screenInfo.protocolScreens[0]->pScreens[i]->x,
+ y + screenInfo.protocolScreens[0]->pScreens[0]->y - screenInfo.protocolScreens[0]->pScreens[i]->y,
&box))
return TRUE;
}
@@ -2748,8 +2748,8 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
/* Motion events entering DIX get translated to Screen 0
coordinates. Replayed events have already been
translated since they've entered DIX before */
- ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x;
- ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y;
+ ev->root_x += pSprite->screen->x - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ ev->root_y += pSprite->screen->y - screenInfo.protocolScreens[0]->pScreens[0]->y;
} else
#endif
{
@@ -2973,7 +2973,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
pSprite->spriteTrace = NULL;
pSprite->spriteTraceSize = 0;
pSprite->spriteTraceGood = 0;
- pSprite->pEnqueueScreen = screenInfo.screens[0];
+ pSprite->pEnqueueScreen = screenInfo.protocolScreens[0]->pScreens[0];
pSprite->pDequeueScreen = pSprite->pEnqueueScreen;
}
if (pCursor)
@@ -2998,10 +2998,10 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin)
}
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
- pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
- pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
- pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
- pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
+ pSprite->hotLimits.x1 = -screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotLimits.y1 = -screenInfo.protocolScreens[0]->pScreens[0]->y;
+ pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.protocolScreens[0]->pScreens[0]->y;
pSprite->physLimits = pSprite->hotLimits;
pSprite->confineWin = NullWindow;
pSprite->hotShape = NullRegion;
@@ -3068,10 +3068,10 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
- pSprite->hotLimits.x1 = -screenInfo.screens[0]->x;
- pSprite->hotLimits.y1 = -screenInfo.screens[0]->y;
- pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x;
- pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y;
+ pSprite->hotLimits.x1 = -screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotLimits.y1 = -screenInfo.protocolScreens[0]->pScreens[0]->y;
+ pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.protocolScreens[0]->pScreens[0]->y;
pSprite->physLimits = pSprite->hotLimits;
pSprite->screen = pScreen;
}
@@ -3104,8 +3104,8 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
pSprite->hotPhys.y = y;
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
- pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x;
- pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y;
+ pSprite->hotPhys.x += newScreen->x - screenInfo.protocolScreens[0]->pScreens[0]->x;
+ pSprite->hotPhys.y += newScreen->y - screenInfo.protocolScreens[0]->pScreens[0]->y;
if (newScreen != pSprite->screen) {
pSprite->screen = newScreen;
/* Make sure we tell the DDX to update its copy of the screen */
@@ -3113,16 +3113,16 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
XineramaConfineCursorToWindow(pDev,
pSprite->confineWin, TRUE);
else
- XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
+ XineramaConfineCursorToWindow(pDev, screenInfo.protocolScreens[0]->pScreens[0]->root, TRUE);
/* if the pointer wasn't confined, the DDX won't get
told of the pointer warp so we reposition it here */
if(!syncEvents.playingEvents)
(*pSprite->screen->SetCursorPosition)(
pDev,
pSprite->screen,
- pSprite->hotPhys.x + screenInfo.screens[0]->x -
+ pSprite->hotPhys.x + screenInfo.protocolScreens[0]->pScreens[0]->x -
pSprite->screen->x,
- pSprite->hotPhys.y + screenInfo.screens[0]->y -
+ pSprite->hotPhys.y + screenInfo.protocolScreens[0]->pScreens[0]->y -
pSprite->screen->y, FALSE);
}
} else
@@ -3150,13 +3150,13 @@ XineramaPointInWindowIsVisible(
if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE;
- xoff = x + screenInfo.screens[0]->x;
- yoff = y + screenInfo.screens[0]->y;
+ xoff = x + screenInfo.protocolScreens[0]->pScreens[0]->x;
+ yoff = y + screenInfo.protocolScreens[0]->pScreens[0]->y;
FOR_NSCREENS_FORWARD_SKIP(i) {
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
- x = xoff - screenInfo.screens[i]->x;
- y = yoff - screenInfo.screens[i]->y;
+ x = xoff - screenInfo.protocolScreens[0]->pScreens[i]->x;
+ y = yoff - screenInfo.protocolScreens[0]->pScreens[i]->y;
if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
@@ -3200,9 +3200,9 @@ XineramaWarpPointer(ClientPtr client)
winX = source->drawable.x;
winY = source->drawable.y;
- if(source == screenInfo.screens[0]->root) {
- winX -= screenInfo.screens[0]->x;
- winY -= screenInfo.screens[0]->y;
+ if(source == screenInfo.protocolScreens[0]->pScreens[0]->root) {
+ winX -= screenInfo.protocolScreens[0]->pScreens[0]->x;
+ winY -= screenInfo.protocolScreens[0]->pScreens[0]->y;
}
if (x < winX + stuff->srcX ||
y < winY + stuff->srcY ||
@@ -3216,9 +3216,9 @@ XineramaWarpPointer(ClientPtr client)
if (dest) {
x = dest->drawable.x;
y = dest->drawable.y;
- if(dest == screenInfo.screens[0]->root) {
- x -= screenInfo.screens[0]->x;
- y -= screenInfo.screens[0]->y;
+ if(dest == screenInfo.protocolScreens[0]->pScreens[0]->root) {
+ x -= screenInfo.protocolScreens[0]->pScreens[0]->x;
+ y -= screenInfo.protocolScreens[0]->pScreens[0]->y;
}
}
@@ -4941,11 +4941,11 @@ ProcQueryPointer(ClientPtr client)
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
- rep.rootX += screenInfo.screens[0]->x;
- rep.rootY += screenInfo.screens[0]->y;
+ rep.rootX += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ rep.rootY += screenInfo.protocolScreens[0]->pScreens[0]->y;
if(stuff->id == rep.root) {
- rep.winX += screenInfo.screens[0]->x;
- rep.winY += screenInfo.screens[0]->y;
+ rep.winX += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ rep.winY += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
}
#endif
@@ -5614,7 +5614,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
#ifdef PANORAMIX
if(!noPanoramiXExtension &&
- (screenInfo.screens[0]->x || screenInfo.screens[0]->y))
+ (screenInfo.protocolScreens[0]->pScreens[0]->x || screenInfo.protocolScreens[0]->pScreens[0]->y))
{
switch(events->u.u.type) {
case MotionNotify:
@@ -5631,13 +5631,13 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
*/
count = 1; /* should always be 1 */
memcpy(&eventCopy, events, sizeof(xEvent));
- eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x;
- eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y;
+ eventCopy.u.keyButtonPointer.rootX += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ eventCopy.u.keyButtonPointer.rootY += screenInfo.protocolScreens[0]->pScreens[0]->y;
if(eventCopy.u.keyButtonPointer.event ==
eventCopy.u.keyButtonPointer.root)
{
- eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x;
- eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y;
+ eventCopy.u.keyButtonPointer.eventX += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ eventCopy.u.keyButtonPointer.eventY += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
events = &eventCopy;
break;
diff --git a/dix/getevents.c b/dix/getevents.c
index c3b7ced45..06b6a07d7 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1297,8 +1297,8 @@ PostSyntheticMotion(DeviceIntPtr pDev,
will translate from sprite screen to screen 0 upon reentry
to the DIX layer. */
if (!noPanoramiXExtension) {
- x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x;
- y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y;
+ x += screenInfo.protocolScreens[0]->pScreens[0]->x - screenInfo.protocolScreens[0]->pScreens[screen]->x;
+ y += screenInfo.protocolScreens[0]->pScreens[0]->y - screenInfo.protocolScreens[0]->pScreens[screen]->y;
}
#endif
diff --git a/dix/window.c b/dix/window.c
index b441c85c2..6a1710e9e 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2238,8 +2238,8 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
event.u.configureRequest.y = y;
#ifdef PANORAMIX
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
- event.u.configureRequest.x += screenInfo.screens[0]->x;
- event.u.configureRequest.y += screenInfo.screens[0]->y;
+ event.u.configureRequest.x += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ event.u.configureRequest.y += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
#endif
event.u.configureRequest.width = w;
@@ -2326,8 +2326,8 @@ ActuallyDoSomething:
event.u.configureNotify.y = y;
#ifdef PANORAMIX
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
- event.u.configureNotify.x += screenInfo.screens[0]->x;
- event.u.configureNotify.y += screenInfo.screens[0]->y;
+ event.u.configureNotify.x += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ event.u.configureNotify.y += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
#endif
event.u.configureNotify.width = w;
@@ -2480,8 +2480,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent,
event.u.reparent.y = y;
#ifdef PANORAMIX
if(!noPanoramiXExtension && !pParent->parent) {
- event.u.reparent.x += screenInfo.screens[0]->x;
- event.u.reparent.y += screenInfo.screens[0]->y;
+ event.u.reparent.x += screenInfo.protocolScreens[0]->pScreens[0]->x;
+ event.u.reparent.y += screenInfo.protocolScreens[0]->pScreens[0]->y;
}
#endif
event.u.reparent.override = pWin->overrideRedirect;
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index f3e41ac17..0e5fbcad8 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -554,7 +554,7 @@ static int dmxPopulate(ClientPtr client, Window window, CARD32 *screens,
static int dmxMaxNumScreens(void)
{
#ifdef PANORAMIX
- if (!noPanoramiXExtension) return PanoramiXNumScreens;
+ if (!noPanoramiXExtension) return screenInfo.protocolScreens[0]->numScreens;
#endif
return 1;
}
diff --git a/hw/dmx/dmxcb.c b/hw/dmx/dmxcb.c
index d0eb35117..f949e6ad8 100644
--- a/hw/dmx/dmxcb.c
+++ b/hw/dmx/dmxcb.c
@@ -49,7 +49,6 @@ extern int connBlockScreenStart;
#include "panoramiXsrv.h"
extern int PanoramiXPixWidth;
extern int PanoramiXPixHeight;
-extern int PanoramiXNumScreens;
#endif
int dmxGlobalWidth, dmxGlobalHeight;
@@ -137,7 +136,7 @@ void dmxConnectionBlockCallback(void)
dmxGlobalHeight = PanoramiXPixHeight;
}
dmxLog(dmxInfo, "%d screens configured with Xinerama (%d %d)\n",
- PanoramiXNumScreens, PanoramiXPixWidth, PanoramiXPixHeight);
+ screenInfo.protocolScreens[0]->numScreens, PanoramiXPixWidth, PanoramiXPixHeight);
FOR_NSCREENS(i) found[i] = FALSE;
} else {
#endif
diff --git a/include/screenint.h b/include/screenint.h
index a40227ee4..9f0ce9c73 100644
--- a/include/screenint.h
+++ b/include/screenint.h
@@ -65,6 +65,7 @@ extern _X_EXPORT int AddScreen(
char** /*argv*/);
extern _X_EXPORT Bool SetupProtocolScreens(void);
+extern _X_EXPORT Bool SetupXineramaProtocolScreens(void);
typedef struct _ColormapRec *ColormapPtr;
#endif /* SCREENINT_H */
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 94258b864..005aea123 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -420,9 +420,9 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
XID realWin = 0;
if(!pWin->parent) {
- x = screenInfo.screens[scrnum]->x;
- y = screenInfo.screens[scrnum]->y;
- pWin = screenInfo.screens[0]->root;
+ x = screenInfo.protocolScreens[0]->pScreens[scrnum]->x;
+ y = screenInfo.protocolScreens[0]->pScreens[scrnum]->y;
+ pWin = screenInfo.protocolScreens[0]->pScreens[0]->root;
realWin = pWin->drawable.id;
} else if (scrnum) {
PanoramiXRes *win;
diff --git a/record/record.c b/record/record.c
index 53be1823f..04138effb 100644
--- a/record/record.c
+++ b/record/record.c
@@ -759,11 +759,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
int scr = XineramaGetCursorScreen(inputInfo.pointer);
memcpy(&shiftedEvent, pev, sizeof(xEvent));
shiftedEvent.u.keyButtonPointer.rootX +=
- screenInfo.screens[scr]->x -
- screenInfo.screens[0]->x;
+ screenInfo.protocolScreens[0]->pScreens[scr]->x -
+ screenInfo.protocolScreens[0]->pScreens[0]->x;
shiftedEvent.u.keyButtonPointer.rootY +=
- screenInfo.screens[scr]->y -
- screenInfo.screens[0]->y;
+ screenInfo.protocolScreens[0]->pScreens[scr]->y -
+ screenInfo.protocolScreens[0]->pScreens[0]->y;
pEvToRecord = &shiftedEvent;
}
#endif /* PANORAMIX */
diff --git a/render/render.c b/render/render.c
index 29c60aecb..5a2b59fa4 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2841,22 +2841,22 @@ PanoramiXRenderComposite (ClientPtr client)
stuff->src = src->info[j].id;
if (src->u.pict.root)
{
- stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x;
- stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y;
+ stuff->xSrc = orig.xSrc - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->ySrc = orig.ySrc - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
stuff->dst = dst->info[j].id;
if (dst->u.pict.root)
{
- stuff->xDst = orig.xDst - screenInfo.screens[j]->x;
- stuff->yDst = orig.yDst - screenInfo.screens[j]->y;
+ stuff->xDst = orig.xDst - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->yDst = orig.yDst - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
if (msk)
{
stuff->mask = msk->info[j].id;
if (msk->u.pict.root)
{
- stuff->xMask = orig.xMask - screenInfo.screens[j]->x;
- stuff->yMask = orig.yMask - screenInfo.screens[j]->y;
+ stuff->xMask = orig.xMask - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->yMask = orig.yMask - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
}
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
@@ -2890,14 +2890,14 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
stuff->src = src->info[j].id;
if (src->u.pict.root)
{
- stuff->xSrc = xSrc - screenInfo.screens[j]->x;
- stuff->ySrc = ySrc - screenInfo.screens[j]->y;
+ stuff->xSrc = xSrc - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->ySrc = ySrc - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
stuff->dst = dst->info[j].id;
if (dst->u.pict.root)
{
- elt->deltax = origElt.deltax - screenInfo.screens[j]->x;
- elt->deltay = origElt.deltay - screenInfo.screens[j]->y;
+ elt->deltax = origElt.deltax - screenInfo.protocolScreens[0]->pScreens[j]->x;
+ elt->deltay = origElt.deltay - screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
if(result != Success) break;
@@ -2927,8 +2927,8 @@ PanoramiXRenderFillRectangles (ClientPtr client)
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root)
{
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xRectangle *rects = (xRectangle *) (stuff + 1);
@@ -2975,8 +2975,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
@@ -3035,8 +3035,8 @@ PanoramiXRenderTriangles(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xTriangle *tri = (xTriangle *) (stuff + 1);
@@ -3091,8 +3091,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@@ -3143,8 +3143,8 @@ PanoramiXRenderTriFan(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = screenInfo.screens[j]->x;
- int y_off = screenInfo.screens[j]->y;
+ int x_off = screenInfo.protocolScreens[0]->pScreens[j]->x;
+ int y_off = screenInfo.protocolScreens[0]->pScreens[j]->y;
if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@@ -3197,8 +3197,8 @@ PanoramiXRenderAddTraps (ClientPtr client)
if (picture->u.pict.root)
{
- stuff->xOff = x_off + screenInfo.screens[j]->x;
- stuff->yOff = y_off + screenInfo.screens[j]->y;
+ stuff->xOff = x_off + screenInfo.protocolScreens[0]->pScreens[j]->x;
+ stuff->yOff = y_off + screenInfo.protocolScreens[0]->pScreens[j]->y;
}
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
if(result != Success) break;