diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-23 10:11:47 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-03 14:03:23 -0700 |
commit | a83cff9f4d622b069c96a68b4e87a669bf1f6446 (patch) | |
tree | b29de5e363feb6b7546ce69dfa0685316bf0b234 | |
parent | 217ccaa5a341018457f468a774c035c0df47d918 (diff) |
Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the
corresponding screen pointer handy, which meant they usually looked like
"dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix declared the dixScreenOrigins array, I figure allocating a
screen private for these values is overkill.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
-rw-r--r-- | Xext/panoramiX.c | 32 | ||||
-rw-r--r-- | Xext/panoramiXprocs.c | 106 | ||||
-rw-r--r-- | Xext/shm.c | 12 | ||||
-rw-r--r-- | Xext/xvdisp.c | 16 | ||||
-rw-r--r-- | Xi/xiquerypointer.c | 9 | ||||
-rw-r--r-- | dix/events.c | 132 | ||||
-rw-r--r-- | dix/getevents.c | 4 | ||||
-rw-r--r-- | dix/globals.c | 2 | ||||
-rw-r--r-- | dix/window.c | 12 | ||||
-rw-r--r-- | hw/dmx/dmxcursor.c | 62 | ||||
-rw-r--r-- | hw/dmx/dmxextension.c | 10 | ||||
-rw-r--r-- | hw/dmx/doc/dmx.xml | 3 | ||||
-rw-r--r-- | hw/dmx/input/dmxcommon.c | 7 | ||||
-rw-r--r-- | hw/dmx/input/dmxconsole.c | 25 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.c | 5 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Cursor.c | 94 | ||||
-rw-r--r-- | hw/xquartz/applewm.c | 6 | ||||
-rw-r--r-- | hw/xquartz/darwin.c | 22 | ||||
-rw-r--r-- | hw/xquartz/darwinEvents.c | 4 | ||||
-rw-r--r-- | hw/xquartz/quartz.c | 12 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprCursor.c | 4 | ||||
-rw-r--r-- | hw/xwin/winscrinit.c | 6 | ||||
-rw-r--r-- | include/globals.h | 2 | ||||
-rw-r--r-- | include/scrnintstr.h | 2 | ||||
-rw-r--r-- | mi/miexpose.c | 4 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.c | 8 | ||||
-rw-r--r-- | record/record.c | 9 | ||||
-rw-r--r-- | render/render.c | 44 |
28 files changed, 321 insertions, 333 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 5f0e97efc..b87da247d 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -198,8 +198,8 @@ XineramaValidateGC( if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) { /* the root window */ - int x_off = dixScreenOrigins[pGC->pScreen->myNum].x; - int y_off = dixScreenOrigins[pGC->pScreen->myNum].y; + int x_off = pGC->pScreen->x; + int y_off = pGC->pScreen->y; int new_val; new_val = pGCPriv->clipOrg.x - x_off; @@ -395,9 +395,9 @@ static void XineramaInitData(ScreenPtr pScreen) pScreen = screenInfo.screens[i]; - TheBox.x1 = dixScreenOrigins[i].x; + TheBox.x1 = pScreen->x; TheBox.x2 = TheBox.x1 + pScreen->width; - TheBox.y1 = dixScreenOrigins[i].y; + TheBox.y1 = pScreen->y; TheBox.y2 = TheBox.y1 + pScreen->height; REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1); @@ -405,13 +405,13 @@ static void XineramaInitData(ScreenPtr pScreen) &XineramaScreenRegions[i]); } - PanoramiXPixWidth = dixScreenOrigins[0].x + screenInfo.screens[0]->width; - PanoramiXPixHeight = dixScreenOrigins[0].y + screenInfo.screens[0]->height; + PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width; + PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height; for (i = 1; i < PanoramiXNumScreens; i++) { pScreen = screenInfo.screens[i]; - w = dixScreenOrigins[i].x + pScreen->width; - h = dixScreenOrigins[i].y + pScreen->height; + w = pScreen->x + pScreen->width; + h = pScreen->y + pScreen->height; if (PanoramiXPixWidth < w) PanoramiXPixWidth = w; @@ -1060,8 +1060,8 @@ ProcXineramaQueryScreens(ClientPtr client) int i; for(i = 0; i < PanoramiXNumScreens; i++) { - scratch.x_org = dixScreenOrigins[i].x; - scratch.y_org = dixScreenOrigins[i].y; + 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; @@ -1153,8 +1153,8 @@ XineramaGetImageData( SrcBox.x1 = left; SrcBox.y1 = top; if(!isRoot) { - SrcBox.x1 += pDraw->x + dixScreenOrigins[0].x; - SrcBox.y1 += pDraw->y + dixScreenOrigins[0].y; + SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x; + SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y; } SrcBox.x2 = SrcBox.x1 + width; SrcBox.y2 = SrcBox.y1 + height; @@ -1171,8 +1171,8 @@ XineramaGetImageData( if(inOut == rgnIN) { (*pDraw->pScreen->GetImage)(pDraw, - SrcBox.x1 - pDraw->x - dixScreenOrigins[i].x, - SrcBox.y1 - pDraw->y - dixScreenOrigins[i].y, + SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x, + SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y, width, height, format, planemask, data); break; } else if (inOut == rgnOUT) @@ -1203,8 +1203,8 @@ XineramaGetImageData( } } - x = pbox->x1 - pDraw->x - dixScreenOrigins[i].x; - y = pbox->y1 - pDraw->y - dixScreenOrigins[i].y; + x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x; + y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y; (*pDraw->pScreen->GetImage)(pDraw, x, y, w, h, format, planemask, ScratchMem); diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index ccd721687..a7f8a0cd5 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -135,8 +135,8 @@ int PanoramiXCreateWindow(ClientPtr client) stuff->wid = newWin->info[j].id; stuff->parent = parent->info[j].id; if (parentIsRoot) { - stuff->x = orig_x - dixScreenOrigins[j].x; - stuff->y = orig_y - dixScreenOrigins[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } if (backPix) *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; @@ -334,8 +334,8 @@ int PanoramiXReparentWindow(ClientPtr client) stuff->window = win->info[j].id; stuff->parent = parent->info[j].id; if(parentIsRoot) { - stuff->x = x - dixScreenOrigins[j].x; - stuff->y = y - dixScreenOrigins[j].y; + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ReparentWindow])(client); if(result != Success) break; @@ -495,9 +495,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 - dixScreenOrigins[j].x; + *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x; if(y_offset >= 0) - *((CARD32 *) &stuff[1] + y_offset) = y - dixScreenOrigins[j].y; + *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y; result = (*SavedProcVector[X_ConfigureWindow])(client); if(result != Success) break; } @@ -565,8 +565,8 @@ int PanoramiXGetGeometry(ClientPtr client) if((pWin->parent == screenInfo.screens[0]->root) || (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - rep.x += dixScreenOrigins[0].x; - rep.y += dixScreenOrigins[0].y; + rep.x += screenInfo.screens[0]->x; + rep.y += screenInfo.screens[0]->y; } rep.borderWidth = pWin->borderWidth; } @@ -599,8 +599,8 @@ int PanoramiXTranslateCoords(ClientPtr client) if((pWin == screenInfo.screens[0]->root) || (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - x = stuff->srcX - dixScreenOrigins[0].x; - y = stuff->srcY - dixScreenOrigins[0].y; + x = stuff->srcX - screenInfo.screens[0]->x; + y = stuff->srcY - screenInfo.screens[0]->y; } else { x = pWin->drawable.x + stuff->srcX; y = pWin->drawable.y + stuff->srcY; @@ -637,8 +637,8 @@ int PanoramiXTranslateCoords(ClientPtr client) if((pDst == screenInfo.screens[0]->root) || (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - rep.dstX += dixScreenOrigins[0].x; - rep.dstY += dixScreenOrigins[0].y; + rep.dstX += screenInfo.screens[0]->x; + rep.dstY += screenInfo.screens[0]->y; } WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); @@ -981,8 +981,8 @@ int PanoramiXClearToBackground(ClientPtr client) FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; if(isRoot) { - stuff->x = x - dixScreenOrigins[j].x; - stuff->y = y - dixScreenOrigins[j].y; + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ClearArea])(client); if(result != Success) break; @@ -1092,12 +1092,12 @@ int PanoramiXCopyArea(ClientPtr client) stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { - stuff->srcX = srcx - dixScreenOrigins[j].x; - stuff->srcY = srcy - dixScreenOrigins[j].y; + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { - stuff->dstX = dstx - dixScreenOrigins[j].x; - stuff->dstY = dsty - dixScreenOrigins[j].y; + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); @@ -1137,7 +1137,7 @@ int PanoramiXCopyArea(ClientPtr client) if(pRgn[j]) { if(srcIsRoot) { REGION_TRANSLATE(pScreen, pRgn[j], - dixScreenOrigins[j].x, dixScreenOrigins[j].y); + screenInfo.screens[j]->x, screenInfo.screens[j]->y); } REGION_APPEND(pScreen, &totalReg, pRgn[j]); REGION_DESTROY(pScreen, pRgn[j]); @@ -1203,12 +1203,12 @@ int PanoramiXCopyPlane(ClientPtr client) stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { - stuff->srcX = srcx - dixScreenOrigins[j].x; - stuff->srcY = srcy - dixScreenOrigins[j].y; + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { - stuff->dstX = dstx - dixScreenOrigins[j].x; - stuff->dstY = dsty - dixScreenOrigins[j].y; + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); @@ -1297,8 +1297,8 @@ int PanoramiXPolyPoint(ClientPtr client) if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPoint *pnts = (xPoint*)&stuff[1]; @@ -1357,8 +1357,8 @@ int PanoramiXPolyLine(ClientPtr client) if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPoint *pnts = (xPoint*)&stuff[1]; @@ -1420,8 +1420,8 @@ int PanoramiXPolySegment(ClientPtr client) if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xSegment *segs = (xSegment*)&stuff[1]; @@ -1483,8 +1483,8 @@ int PanoramiXPolyRectangle(ClientPtr client) if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { @@ -1545,8 +1545,8 @@ int PanoramiXPolyArc(ClientPtr client) if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; @@ -1603,8 +1603,8 @@ int PanoramiXFillPoly(ClientPtr client) if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { DDXPointPtr pnts = (DDXPointPtr)&stuff[1]; @@ -1666,8 +1666,8 @@ int PanoramiXPolyFillRectangle(ClientPtr client) if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xRectangle *rects = (xRectangle *) &stuff[1]; @@ -1727,8 +1727,8 @@ int PanoramiXPolyFillArc(ClientPtr client) if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; @@ -1780,8 +1780,8 @@ int PanoramiXPutImage(ClientPtr client) orig_y = stuff->dstY; FOR_NSCREENS_BACKWARD(j){ if (isRoot) { - stuff->dstX = orig_x - dixScreenOrigins[j].x; - stuff->dstY = orig_y - dixScreenOrigins[j].y; + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; @@ -1846,10 +1846,10 @@ int PanoramiXGetImage(ClientPtr client) return(BadMatch); } else { if( /* check for being onscreen */ - dixScreenOrigins[0].x + pDraw->x + x < 0 || - dixScreenOrigins[0].x + pDraw->x + x + w > PanoramiXPixWidth || - dixScreenOrigins[0].y + pDraw->y + y < 0 || - dixScreenOrigins[0].y + pDraw->y + y + h > PanoramiXPixHeight || + 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 || /* check for being inside of border */ x < - wBorderWidth((WindowPtr)pDraw) || x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || @@ -1983,8 +1983,8 @@ PanoramiXPolyText8(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - dixScreenOrigins[j].x; - stuff->y = orig_y - dixScreenOrigins[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText8])(client); if(result != Success) break; @@ -2024,8 +2024,8 @@ PanoramiXPolyText16(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - dixScreenOrigins[j].x; - stuff->y = orig_y - dixScreenOrigins[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText16])(client); if(result != Success) break; @@ -2065,8 +2065,8 @@ int PanoramiXImageText8(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - dixScreenOrigins[j].x; - stuff->y = orig_y - dixScreenOrigins[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText8])(client); if(result != Success) break; @@ -2106,8 +2106,8 @@ int PanoramiXImageText16(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - dixScreenOrigins[j].x; - stuff->y = orig_y - dixScreenOrigins[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText16])(client); if(result != Success) break; diff --git a/Xext/shm.c b/Xext/shm.c index 99cd39ed3..322709c17 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -598,8 +598,8 @@ ProcPanoramiXShmPutImage(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->dstX = orig_x - dixScreenOrigins[j].x; - stuff->dstY = orig_y - dixScreenOrigins[j].y; + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; } result = ProcShmPutImage(client); if(result != Success) break; @@ -660,10 +660,10 @@ ProcPanoramiXShmGetImage(ClientPtr client) return(BadMatch); } else { if( /* check for being onscreen */ - dixScreenOrigins[0].x + pDraw->x + x < 0 || - dixScreenOrigins[0].x + pDraw->x + x + w > PanoramiXPixWidth || - dixScreenOrigins[0].y + pDraw->y + y < 0 || - dixScreenOrigins[0].y + pDraw->y + y + h > PanoramiXPixHeight || + 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 || /* check for being inside of border */ x < - wBorderWidth((WindowPtr)pDraw) || x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index efbe9738d..c63706d46 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 -= dixScreenOrigins[i].x; - stuff->drw_y -= dixScreenOrigins[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[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 -= dixScreenOrigins[i].x; - stuff->drw_y -= dixScreenOrigins[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[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 -= dixScreenOrigins[i].x; - stuff->drw_y -= dixScreenOrigins[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[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 -= dixScreenOrigins[i].x; - stuff->drw_y -= dixScreenOrigins[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutStill(client); diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c index a0c26ba99..b521c48ef 100644 --- a/Xi/xiquerypointer.c +++ b/Xi/xiquerypointer.c @@ -43,6 +43,7 @@ #include "exevents.h" #include "exglobals.h" #include "eventconvert.h" +#include "scrnintstr.h" #include "xkbsrv.h" #ifdef PANORAMIX @@ -181,12 +182,12 @@ ProcXIQueryPointer(ClientPtr client) #ifdef PANORAMIX if(!noPanoramiXExtension) { - rep.root_x += FP1616(dixScreenOrigins[0].x, 0); - rep.root_y += FP1616(dixScreenOrigins[0].y, 0); + rep.root_x += FP1616(screenInfo.screens[0]->x, 0); + rep.root_y += FP1616(screenInfo.screens[0]->y, 0); if (stuff->win == rep.root) { - rep.win_x += FP1616(dixScreenOrigins[0].x, 0); - rep.win_y += FP1616(dixScreenOrigins[0].y, 0); + rep.win_x += FP1616(screenInfo.screens[0]->x, 0); + rep.win_y += FP1616(screenInfo.screens[0]->y, 0); } } #endif diff --git a/dix/events.c b/dix/events.c index 21ee85ef8..e8e65e2e5 100644 --- a/dix/events.c +++ b/dix/events.c @@ -502,8 +502,8 @@ XineramaSetCursorPosition( that screen are. */ pScreen = pSprite->screen; - x += dixScreenOrigins[0].x; - y += dixScreenOrigins[0].y; + x += screenInfo.screens[0]->x; + y += screenInfo.screens[0]->y; if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], x, y, &box)) @@ -521,10 +521,10 @@ XineramaSetCursorPosition( } pSprite->screen = pScreen; - pSprite->hotPhys.x = x - dixScreenOrigins[0].x; - pSprite->hotPhys.y = y - dixScreenOrigins[0].y; - x -= dixScreenOrigins[pScreen->myNum].x; - y -= dixScreenOrigins[pScreen->myNum].y; + pSprite->hotPhys.x = x - screenInfo.screens[0]->x; + pSprite->hotPhys.y = y - screenInfo.screens[0]->y; + x -= pScreen->x; + y -= pScreen->y; return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent); } @@ -542,10 +542,10 @@ XineramaConstrainCursor(DeviceIntPtr pDev) /* Translate the constraining box to the screen the sprite is actually on */ - newBox.x1 += dixScreenOrigins[0].x - dixScreenOrigins[pScreen->myNum].x; - newBox.x2 += dixScreenOrigins[0].x - dixScreenOrigins[pScreen->myNum].x; - newBox.y1 += dixScreenOrigins[0].y - dixScreenOrigins[pScreen->myNum].y; - newBox.y2 += dixScreenOrigins[0].y - dixScreenOrigins[pScreen->myNum].y; + 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; (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox); } @@ -595,12 +595,12 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, REGION_COPY(pSprite->screen, &pSprite->Reg1, &pSprite->windows[i]->borderSize); - off_x = dixScreenOrigins[i].x; - off_y = dixScreenOrigins[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; while(i--) { - x = off_x - dixScreenOrigins[i].x; - y = off_y - dixScreenOrigins[i].y; + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; if(x || y) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); @@ -608,8 +608,8 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, &pSprite->windows[i]->borderSize); - off_x = dixScreenOrigins[i].x; - off_y = dixScreenOrigins[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; } pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1); @@ -814,12 +814,12 @@ CheckVirtualMotion( REGION_COPY(pSprite->screen, &pSprite->Reg2, &pSprite->windows[i]->borderSize); - off_x = dixScreenOrigins[i].x; - off_y = dixScreenOrigins[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; while(i--) { - x = off_x - dixScreenOrigins[i].x; - y = off_y - dixScreenOrigins[i].y; + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; if(x || y) REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); @@ -827,8 +827,8 @@ CheckVirtualMotion( REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, &pSprite->windows[i]->borderSize); - off_x = dixScreenOrigins[i].x; - off_y = dixScreenOrigins[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; } } else #endif @@ -1135,10 +1135,8 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) { #ifdef PANORAMIX if(!noPanoramiXExtension) { - event->root_x += dixScreenOrigins[pSprite->screen->myNum].x - - dixScreenOrigins[0].x; - event->root_y += dixScreenOrigins[pSprite->screen->myNum].y - - dixScreenOrigins[0].y; + event->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + event->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } #endif pSprite->hotPhys.x = event->root_x; @@ -1218,10 +1216,10 @@ PlayReleasedEvents(void) case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: - ev->root_x += dixScreenOrigins[0].x - - dixScreenOrigins[pDev->spriteInfo->sprite->screen->myNum].x; - ev->root_y += dixScreenOrigins[0].y - - dixScreenOrigins[pDev->spriteInfo->sprite->screen->myNum].y; + ev->root_x += screenInfo.screens[0]->x - + pDev->spriteInfo->sprite->screen->x; + ev->root_y += screenInfo.screens[0]->y - + pDev->spriteInfo->sprite->screen->y; break; default: break; @@ -2561,8 +2559,8 @@ PointInBorderSize(WindowPtr pWin, int x, int y) for(i = 1; i < PanoramiXNumScreens; i++) { if(POINT_IN_REGION(pSprite->screen, &pSprite->windows[i]->borderSize, - x + dixScreenOrigins[0].x - dixScreenOrigins[i].x, - y + dixScreenOrigins[0].y - dixScreenOrigins[i].y, + x + screenInfo.screens[0]->x - screenInfo.screens[i]->x, + y + screenInfo.screens[0]->y - screenInfo.screens[i]->y, &box)) return TRUE; } @@ -2757,10 +2755,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 += dixScreenOrigins[pSprite->screen->myNum].x - - dixScreenOrigins[0].x; - ev->root_y += dixScreenOrigins[pSprite->screen->myNum].y - - dixScreenOrigins[0].y; + ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } else #endif { @@ -3008,10 +3004,10 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) } #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -dixScreenOrigins[0].x; - pSprite->hotLimits.y1 = -dixScreenOrigins[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - dixScreenOrigins[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - dixScreenOrigins[0].y; + 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->physLimits = pSprite->hotLimits; pSprite->confineWin = NullWindow; pSprite->hotShape = NullRegion; @@ -3078,10 +3074,10 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -dixScreenOrigins[0].x; - pSprite->hotLimits.y1 = -dixScreenOrigins[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - dixScreenOrigins[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - dixScreenOrigins[0].y; + 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->physLimits = pSprite->hotLimits; pSprite->screen = pScreen; } @@ -3114,10 +3110,8 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) pSprite->hotPhys.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotPhys.x += dixScreenOrigins[newScreen->myNum].x - - dixScreenOrigins[0].x; - pSprite->hotPhys.y += dixScreenOrigins[newScreen->myNum].y - - dixScreenOrigins[0].y; + pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x; + pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y; if (newScreen != pSprite->screen) { pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ @@ -3132,10 +3126,10 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) (*pSprite->screen->SetCursorPosition)( pDev, pSprite->screen, - pSprite->hotPhys.x + dixScreenOrigins[0].x - - dixScreenOrigins[pSprite->screen->myNum].x, - pSprite->hotPhys.y + dixScreenOrigins[0].y - - dixScreenOrigins[pSprite->screen->myNum].y, FALSE); + pSprite->hotPhys.x + screenInfo.screens[0]->x - + pSprite->screen->x, + pSprite->hotPhys.y + screenInfo.screens[0]->y - + pSprite->screen->y, FALSE); } } else #endif @@ -3163,14 +3157,14 @@ XineramaPointInWindowIsVisible( if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE; - xoff = x + dixScreenOrigins[0].x; - yoff = y + dixScreenOrigins[0].y; + xoff = x + screenInfo.screens[0]->x; + yoff = y + screenInfo.screens[0]->y; for(i = 1; i < PanoramiXNumScreens; i++) { pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; pScreen = pWin->drawable.pScreen; - x = xoff - dixScreenOrigins[i].x; - y = yoff - dixScreenOrigins[i].y; + x = xoff - screenInfo.screens[i]->x; + y = yoff - screenInfo.screens[i]->y; if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || @@ -3216,8 +3210,8 @@ XineramaWarpPointer(ClientPtr client) winX = source->drawable.x; winY = source->drawable.y; if(source == screenInfo.screens[0]->root) { - winX -= dixScreenOrigins[0].x; - winY -= dixScreenOrigins[0].y; + winX -= screenInfo.screens[0]->x; + winY -= screenInfo.screens[0]->y; } if (x < winX + stuff->srcX || y < winY + stuff->srcY || @@ -3232,8 +3226,8 @@ XineramaWarpPointer(ClientPtr client) x = dest->drawable.x; y = dest->drawable.y; if(dest == screenInfo.screens[0]->root) { - x -= dixScreenOrigins[0].x; - y -= dixScreenOrigins[0].y; + x -= screenInfo.screens[0]->x; + y -= screenInfo.screens[0]->y; } } @@ -4997,11 +4991,11 @@ ProcQueryPointer(ClientPtr client) #ifdef PANORAMIX if(!noPanoramiXExtension) { - rep.rootX += dixScreenOrigins[0].x; - rep.rootY += dixScreenOrigins[0].y; + rep.rootX += screenInfo.screens[0]->x; + rep.rootY += screenInfo.screens[0]->y; if(stuff->id == rep.root) { - rep.winX += dixScreenOrigins[0].x; - rep.winY += dixScreenOrigins[0].y; + rep.winX += screenInfo.screens[0]->x; + rep.winY += screenInfo.screens[0]->y; } } #endif @@ -5670,7 +5664,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) #ifdef PANORAMIX if(!noPanoramiXExtension && - (dixScreenOrigins[0].x || dixScreenOrigins[0].y)) + (screenInfo.screens[0]->x || screenInfo.screens[0]->y)) { switch(events->u.u.type) { case MotionNotify: @@ -5687,13 +5681,13 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) */ count = 1; /* should always be 1 */ memcpy(&eventCopy, events, sizeof(xEvent)); - eventCopy.u.keyButtonPointer.rootX += dixScreenOrigins[0].x; - eventCopy.u.keyButtonPointer.rootY += dixScreenOrigins[0].y; + eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y; if(eventCopy.u.keyButtonPointer.event == eventCopy.u.keyButtonPointer.root) { - eventCopy.u.keyButtonPointer.eventX += dixScreenOrigins[0].x; - eventCopy.u.keyButtonPointer.eventY += dixScreenOrigins[0].y; + eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y; } events = &eventCopy; break; diff --git a/dix/getevents.c b/dix/getevents.c index 3ca5883d9..3892f6fb2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1210,8 +1210,8 @@ PostSyntheticMotion(DeviceIntPtr pDev, will translate from sprite screen to screen 0 upon reentry to the DIX layer. */ if (!noPanoramiXExtension) { - x += dixScreenOrigins[0].x - dixScreenOrigins[screen].x; - y += dixScreenOrigins[0].y - dixScreenOrigins[screen].y; + x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x; + y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y; } #endif diff --git a/dix/globals.c b/dix/globals.c index 28e7d072d..82a85c28e 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -135,5 +135,3 @@ char *display; char *ConnectionInfo; CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; - -DDXPointRec dixScreenOrigins[MAXSCREENS]; diff --git a/dix/window.c b/dix/window.c index 834552313..9e1f491d8 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2236,8 +2236,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 += dixScreenOrigins[0].x; - event.u.configureRequest.y += dixScreenOrigins[0].y; + event.u.configureRequest.x += screenInfo.screens[0]->x; + event.u.configureRequest.y += screenInfo.screens[0]->y; } #endif event.u.configureRequest.width = w; @@ -2317,8 +2317,8 @@ ActuallyDoSomething: event.u.configureNotify.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { - event.u.configureNotify.x += dixScreenOrigins[0].x; - event.u.configureNotify.y += dixScreenOrigins[0].y; + event.u.configureNotify.x += screenInfo.screens[0]->x; + event.u.configureNotify.y += screenInfo.screens[0]->y; } #endif event.u.configureNotify.width = w; @@ -2471,8 +2471,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, event.u.reparent.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension && !pParent->parent) { - event.u.reparent.x += dixScreenOrigins[0].x; - event.u.reparent.y += dixScreenOrigins[0].y; + event.u.reparent.x += screenInfo.screens[0]->x; + event.u.reparent.y += screenInfo.screens[0]->y; } #endif event.u.reparent.override = pWin->overrideRedirect; diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index bf5640db7..7e0368699 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -230,7 +230,7 @@ static int dmxSLFindNext(int *list) /** Make one pass over all the screens and return the number updated. */ static int dmxTryComputeScreenOrigins(int *screensLeft) { - ScreenPtr pScreen; + ScreenPtr pScreen, refScreen; DMXScreenInfo *screen; int i, ref; int changed = 0; @@ -239,54 +239,56 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) if (!screensLeft[i]) continue; screen = &dmxScreens[i]; + pScreen = screenInfo.screens[i]; switch (screen->where) { case PosAbsolute: - dixScreenOrigins[i].x = screen->whereX; - dixScreenOrigins[i].y = screen->whereY; + pScreen->x = screen->whereX; + pScreen->y = screen->whereY; ++changed, screensLeft[i] = 0; break; case PosRelative: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->whereX; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->whereY; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x + screen->whereX; + pScreen->y = refScreen->y + screen->whereY; ++changed, screensLeft[i] = 0; break; case PosRightOf: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[ref]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x + refScreen->width; + pScreen->y = refScreen->y; ++changed, screensLeft[i] = 0; break; case PosLeftOf: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[i]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x - pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x - pScreen->width; + pScreen->y = refScreen->y; ++changed, screensLeft[i] = 0; break; case PosBelow: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[ref]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + pScreen->height; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y + refScreen->height; ++changed, screensLeft[i] = 0; break; case PosAbove: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[i]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y - pScreen->height; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y - pScreen->height; ++changed, screensLeft[i] = 0; break; case PosNone: @@ -298,6 +300,7 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) static void dmxComputeScreenOrigins(void) { + ScreenPtr pScreen; int *screensLeft; int i, ref; int minX, minY; @@ -313,8 +316,9 @@ static void dmxComputeScreenOrigins(void) * guarantees that we will eventually terminate. */ ref = dmxScreens[i].whereRefScreen; - dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0; - screensLeft[ref] = 0; + pScreen = screenInfo.screens[ref]; + pScreen->x = pScreen->y = 0; + screensLeft[ref] = 0; } } dmxSLFree(screensLeft); @@ -322,18 +326,18 @@ static void dmxComputeScreenOrigins(void) /* Justify the topmost and leftmost to * (0,0). */ - minX = dixScreenOrigins[0].x; - minY = dixScreenOrigins[0].y; + minX = screenInfo.screens[0]->x; + minY = screenInfo.screens[0]->y; for (i = 1; i < dmxNumScreens; i++) { /* Compute minX, minY */ - if (dixScreenOrigins[i].x < minX) - minX = dixScreenOrigins[i].x; - if (dixScreenOrigins[i].y < minY) - minY = dixScreenOrigins[i].y; + if (screenInfo.screens[i]->x < minX) + minX = screenInfo.screens[i]->x; + if (screenInfo.screens[i]->y < minY) + minY = screenInfo.screens[i]->y; } if (minX || minY) { for (i = 0; i < dmxNumScreens; i++) { - dixScreenOrigins[i].x -= minX; - dixScreenOrigins[i].y -= minY; + screenInfo.screens[i]->x -= minX; + screenInfo.screens[i]->y -= minY; } } } @@ -398,8 +402,8 @@ void dmxInitOrigins(void) for (i = 0; i < dmxNumScreens; i++) { DMXScreenInfo *dmxScreen = &dmxScreens[i]; - dmxScreen->rootXOrigin = dixScreenOrigins[i].x; - dmxScreen->rootYOrigin = dixScreenOrigins[i].y; + dmxScreen->rootXOrigin = screenInfo.screens[i]->x; + dmxScreen->rootYOrigin = screenInfo.screens[i]->y; } dmxReInitOrigins(); diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index 678f29054..5945a5eda 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -447,12 +447,12 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y) dmxScreen->rootYOrigin = y; /* Compute offsets here in case <x,y> has been changed above */ - xoff = x - dixScreenOrigins[idx].x; - yoff = y - dixScreenOrigins[idx].y; + xoff = x - pScreen->x; + yoff = y - pScreen->y; - /* Adjust the root window's position in dixScreenOrigins */ - dixScreenOrigins[idx].x = dmxScreen->rootXOrigin; - dixScreenOrigins[idx].y = dmxScreen->rootYOrigin; + /* Adjust the root window's position */ + pScreen->x = dmxScreen->rootXOrigin; + pScreen->y = dmxScreen->rootYOrigin; /* Recalculate the Xinerama regions and data structs */ XineramaReinitData(pScreen); diff --git a/hw/dmx/doc/dmx.xml b/hw/dmx/doc/dmx.xml index 251e6ac13..d0c83bbcc 100644 --- a/hw/dmx/doc/dmx.xml +++ b/hw/dmx/doc/dmx.xml @@ -1511,8 +1511,7 @@ PanoramiX prefix. physical screen, and single region (PanoramiXScreenRegion) is initialized to be the union of the screen regions. The relative positioning information for the - physical screens is taken from the array - dixScreenOrigins[], which + physical screens is taken from the ScreenRec x and y members, which the DDX layer must initialize in InitOutput(). The bounds of the combined screen is also calculated (PanoramiXPixWidth and PanoramiXPixHeight). diff --git a/hw/dmx/input/dmxcommon.c b/hw/dmx/input/dmxcommon.c index 2f23d1c9b..c665dad90 100644 --- a/hw/dmx/input/dmxcommon.c +++ b/hw/dmx/input/dmxcommon.c @@ -526,10 +526,9 @@ int dmxFindPointerScreen(int x, int y) int i; for (i = 0; i < dmxNumScreens; i++) { - if (x >= dixScreenOrigins[i].x - && x < dixScreenOrigins[i].x + screenInfo.screens[i]->width - && y >= dixScreenOrigins[i].y - && y < dixScreenOrigins[i].y + screenInfo.screens[i]->height) + ScreenPtr pScreen = screenInfo.screens[i]; + if (x >= pScreen->x && x < pScreen->x + pScreen->width && + y >= pScreen->y && y < pScreen->y + pScreen->height) return i; } return -1; diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c index bf34169ab..297166edd 100644 --- a/hw/dmx/input/dmxconsole.c +++ b/hw/dmx/input/dmxconsole.c @@ -204,7 +204,8 @@ static void dmxConsoleDrawWindows(pointer private) XUnionRectWithRegion(&rect, whole, whole); for (i = 0; i < dmxNumScreens; i++) { - WindowPtr pRoot = screenInfo.screens[i]->root; + ScreenPtr pScreen = screenInfo.screens[i]; + WindowPtr pRoot = pScreen->root; WindowPtr pChild; #if DMX_WINDOW_DEBUG @@ -227,10 +228,8 @@ static void dmxConsoleDrawWindows(pointer private) pChild->overrideRedirect, REGION_NUM_RECTS(&pChild->clipList)); #endif - rect.x = scalex(priv, pChild->drawable.x - + dixScreenOrigins[i].x); - rect.y = scaley(priv, pChild->drawable.y - + dixScreenOrigins[i].y); + rect.x = scalex(priv, pChild->drawable.x + pScreen->x); + rect.y = scaley(priv, pChild->drawable.y + pScreen->y); rect.width = scalex(priv, pChild->drawable.width); rect.height = scaley(priv, pChild->drawable.height); XDrawRectangle(dpy, priv->pixmap, priv->gc, @@ -263,15 +262,15 @@ static void dmxConsoleDraw(myPrivate *priv, int updateCursor, int update) DMXScreenInfo *dmxScreen = &dmxScreens[i]; XFillRectangle(dpy, priv->pixmap, dmxScreen->beDisplay ? priv->gcRev : priv->gcDet, - scalex(priv, dixScreenOrigins[i].x), - scaley(priv, dixScreenOrigins[i].y), + scalex(priv, screenInfo.screens[i]->x), + scaley(priv, screenInfo.screens[i]->y), scalex(priv, screenInfo.screens[i]->width), scaley(priv, screenInfo.screens[i]->height)); } for (i = 0; i < dmxNumScreens; i++) { XDrawRectangle(dpy, priv->pixmap, priv->gc, - scalex(priv, dixScreenOrigins[i].x), - scaley(priv, dixScreenOrigins[i].y), + scalex(priv, screenInfo.screens[i]->x), + scaley(priv, screenInfo.screens[i]->y), scalex(priv, screenInfo.screens[i]->width), scaley(priv, screenInfo.screens[i]->height)); } @@ -671,11 +670,11 @@ static void dmxConsoleComputeWidthHeight(myPrivate *priv, * possible by computing the visible * bounding box. */ for (i = 0; i < dmxNumScreens; i++) { - if (dixScreenOrigins[i].x+screenInfo.screens[i]->width > *width) - *width = dixScreenOrigins[i].x+screenInfo.screens[i]->width; + if (screenInfo.screens[i]->x+screenInfo.screens[i]->width > *width) + *width = screenInfo.screens[i]->x+screenInfo.screens[i]->width; - if (dixScreenOrigins[i].y+screenInfo.screens[i]->height > *height) - *height = dixScreenOrigins[i].y+screenInfo.screens[i]->height; + if (screenInfo.screens[i]->y+screenInfo.screens[i]->height > *height) + *height = screenInfo.screens[i]->y+screenInfo.screens[i]->height; } #endif diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 10df02dbc..7993f9bd1 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -941,9 +941,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) pScreenPriv->card = card; pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3; pScreenPriv->dpmsState = KD_DPMS_NORMAL; -#ifdef PANORAMIX - dixScreenOrigins[pScreen->myNum] = screen->origin; -#endif + pScreen->x = screen->origin.x; + pScreen->y = screen->origin.y; if (!monitorResolution) monitorResolution = 75; diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 9cde0599d..714743a8c 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -581,7 +581,7 @@ xf86InitOrigins(void) { unsigned long screensLeft, prevScreensLeft, mask; screenLayoutPtr screen; - ScreenPtr pScreen; + ScreenPtr pScreen, refScreen; int x1, x2, y1, y2, left, right, top, bottom; int i, j, ref, minX, minY, min, max; xf86ScreenLayoutPtr pLayout; @@ -608,6 +608,7 @@ xf86InitOrigins(void) continue; } + pScreen = xf86Screens[i]->pScreen; switch(screen->where) { case PosObsolete: OldStyleConfig = TRUE; @@ -620,7 +621,7 @@ xf86InitOrigins(void) break; } pLayout->left = AddEdge(pLayout->left, - 0, xf86Screens[i]->pScreen->height, + 0, pScreen->height, xf86Screens[ref]->pScreen->width, 0, ref); } if(screen->right) { @@ -629,7 +630,6 @@ xf86InitOrigins(void) ErrorF("Referenced uninitialized screen in Layout!\n"); break; } - pScreen = xf86Screens[i]->pScreen; pLayout->right = AddEdge(pLayout->right, 0, pScreen->height, -pScreen->width, 0, ref); } @@ -640,7 +640,7 @@ xf86InitOrigins(void) break; } pLayout->up = AddEdge(pLayout->up, - 0, xf86Screens[i]->pScreen->width, + 0, pScreen->width, 0, xf86Screens[ref]->pScreen->height, ref); } if(screen->bottom) { @@ -649,7 +649,6 @@ xf86InitOrigins(void) ErrorF("Referenced uninitialized screen in Layout!\n"); break; } - pScreen = xf86Screens[i]->pScreen; pLayout->down = AddEdge(pLayout->down, 0, pScreen->width, 0, -pScreen->height, ref); } @@ -658,8 +657,8 @@ xf86InitOrigins(void) screen->x = screen->y = 0; /* FALLTHROUGH */ case PosAbsolute: - dixScreenOrigins[i].x = screen->x; - dixScreenOrigins[i].y = screen->y; + pScreen->x = screen->x; + pScreen->y = screen->y; screensLeft &= ~(1 << i); break; case PosRelative: @@ -669,8 +668,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x + screen->x; + pScreen->y = refScreen->y + screen->y; screensLeft &= ~(1 << i); break; case PosRightOf: @@ -680,10 +680,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[ref]->pScreen; - dixScreenOrigins[i].x = - dixScreenOrigins[ref].x + pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x + refScreen->width; + pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosLeftOf: @@ -693,10 +692,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[i]->pScreen; - dixScreenOrigins[i].x = - dixScreenOrigins[ref].x - pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x - pScreen->width; + pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosBelow: @@ -706,10 +704,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[ref]->pScreen; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = - dixScreenOrigins[ref].y + pScreen->height; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y + refScreen->height; screensLeft &= ~(1 << i); break; case PosAbove: @@ -719,10 +716,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[i]->pScreen; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = - dixScreenOrigins[ref].y - pScreen->height; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y - pScreen->height; screensLeft &= ~(1 << i); break; default: @@ -741,7 +737,7 @@ xf86InitOrigins(void) while(!((1 << i) & screensLeft)){ i++; } ref = xf86ConfigLayout.screens[i].refscreen->screennum; - dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0; + xf86Screens[ref]->pScreen->x = xf86Screens[ref]->pScreen->y = 0; screensLeft &= ~(1 << ref); } @@ -749,20 +745,20 @@ xf86InitOrigins(void) } /* justify the topmost and leftmost to (0,0) */ - minX = dixScreenOrigins[0].x; - minY = dixScreenOrigins[0].y; + minX = xf86Screens[0]->pScreen->x; + minY = xf86Screens[0]->pScreen->y; for(i = 1; i < xf86NumScreens; i++) { - if(dixScreenOrigins[i].x < minX) - minX = dixScreenOrigins[i].x; - if(dixScreenOrigins[i].y < minY) - minY = dixScreenOrigins[i].y; + if(xf86Screens[i]->pScreen->x < minX) + minX = xf86Screens[i]->pScreen->x; + if(xf86Screens[i]->pScreen->y < minY) + minY = xf86Screens[i]->pScreen->y; } if (minX || minY) { for(i = 0; i < xf86NumScreens; i++) { - dixScreenOrigins[i].x -= minX; - dixScreenOrigins[i].y -= minY; + xf86Screens[i]->pScreen->x -= minX; + xf86Screens[i]->pScreen->y -= minY; } } @@ -775,18 +771,20 @@ xf86InitOrigins(void) pScreen = xf86Screens[i]->pScreen; - left = dixScreenOrigins[i].x; + left = pScreen->x; right = left + pScreen->width; - top = dixScreenOrigins[i].y; + top = pScreen->y; bottom = top + pScreen->height; for(j = 0; j < xf86NumScreens; j++) { if(i == j) continue; - x1 = dixScreenOrigins[j].x; - x2 = x1 + xf86Screens[j]->pScreen->width; - y1 = dixScreenOrigins[j].y; - y2 = y1 + xf86Screens[j]->pScreen->height; + refScreen = xf86Screens[j]->pScreen; + + x1 = refScreen->x; + x2 = x1 + refScreen->width; + y1 = refScreen->y; + y2 = y1 + refScreen->height; if((bottom > y1) && (top < y2)) { min = y1 - top; @@ -796,13 +794,13 @@ xf86InitOrigins(void) if(((left - 1) >= x1) && ((left - 1) < x2)) pLayout->left = AddEdge(pLayout->left, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); if((right >= x1) && (right < x2)) pLayout->right = AddEdge(pLayout->right, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); } @@ -814,13 +812,13 @@ xf86InitOrigins(void) if(((top - 1) >= y1) && ((top - 1) < y2)) pLayout->up = AddEdge(pLayout->up, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); if((bottom >= y1) && (bottom < y2)) pLayout->down = AddEdge(pLayout->down, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); } } } diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index 0845f67f0..1c77ad984 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -140,10 +140,8 @@ AppleWMSetScreenOrigin( { int32_t data[2]; - data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x - + darwinMainScreenX); - data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y - + darwinMainScreenY); + data[0] = pWin->drawable.pScreen->x + darwinMainScreenX; + data[1] = pWin->drawable.pScreen->y + darwinMainScreenY; dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 825afa0de..7453eccdf 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -262,8 +262,8 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv return FALSE; } - dixScreenOrigins[index].x = dfb->x; - dixScreenOrigins[index].y = dfb->y; + pScreen->x = dfb->x; + pScreen->y = dfb->y; /* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", index, dfb->width, dfb->height, dfb->x, dfb->y); */ @@ -526,16 +526,16 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) { int i, left, top; - left = dixScreenOrigins[0].x; - top = dixScreenOrigins[0].y; + left = pScreenInfo->screens[0]->x; + top = pScreenInfo->screens[0]->y; /* Find leftmost screen. If there's a tie, take the topmost of the two. */ for (i = 1; i < pScreenInfo->numScreens; i++) { - if (dixScreenOrigins[i].x < left || - (dixScreenOrigins[i].x == left && dixScreenOrigins[i].y < top)) + if (pScreenInfo->screens[i]->x < left || + (pScreenInfo->screens[i]->x == left && pScreenInfo->screens[i]->y < top)) { - left = dixScreenOrigins[i].x; - top = dixScreenOrigins[i].y; + left = pScreenInfo->screens[i]->x; + top = pScreenInfo->screens[i]->y; } } @@ -551,10 +551,10 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { for (i = 0; i < pScreenInfo->numScreens; i++) { - dixScreenOrigins[i].x -= darwinMainScreenX; - dixScreenOrigins[i].y -= darwinMainScreenY; + pScreenInfo->screens[i]->x -= darwinMainScreenX; + pScreenInfo->screens[i]->y -= darwinMainScreenY; DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n", - i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + i, pScreenInfo->screens[i]->x, pScreenInfo->screens[i]->y); } } } diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 421efcedf..147b32a09 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -377,8 +377,8 @@ static void DarwinPrepareValuators(DeviceIntPtr pDev, int *valuators, ScreenPtr float pointer_x, float pointer_y, float pressure, float tilt_x, float tilt_y) { /* Fix offset between darwin and X screens */ - pointer_x -= darwinMainScreenX + dixScreenOrigins[screen->myNum].x; - pointer_y -= darwinMainScreenY + dixScreenOrigins[screen->myNum].y; + pointer_x -= darwinMainScreenX + screen->x; + pointer_y -= darwinMainScreenY + screen->y; if(pointer_x < 0.0) pointer_x = 0.0; diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index ac7fedd13..bb37e4abe 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -259,8 +259,8 @@ void QuartzUpdateScreens(void) { PseudoramiXResetScreens(); quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height); - dixScreenOrigins[pScreen->myNum].x = x; - dixScreenOrigins[pScreen->myNum].y = y; + pScreen->x = x; + pScreen->y = y; pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width); pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); pScreen->width = width; @@ -269,11 +269,11 @@ void QuartzUpdateScreens(void) { DarwinAdjustScreenOrigins(&screenInfo); quartzProcs->UpdateScreen(pScreen); - /* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins, + /* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y, * so use it rather than x/y */ - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + sx = pScreen->x + darwinMainScreenX; + sy = pScreen->y + darwinMainScreenY; /* Adjust the root window. */ pRoot = pScreen->root; @@ -292,7 +292,7 @@ void QuartzUpdateScreens(void) { inputInfo.pointer->spriteInfo->sprite->physLimits = bounds; inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds; - DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y); + DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y); /* Send an event for the root reconfigure */ e.u.u.type = ConfigureNotify; diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c index c1c8b2005..fdb85630d 100644 --- a/hw/xquartz/xpr/xprCursor.c +++ b/hw/xquartz/xpr/xprCursor.c @@ -296,8 +296,8 @@ QuartzWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { int sx, sy; - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + sx = pScreen->x + darwinMainScreenX; + sy = pScreen->y + darwinMainScreenY; CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y)); } diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 4fa987cd9..7add0e3f4 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -243,11 +243,11 @@ winScreenInit (int index, Note the screen origin in a normalized coordinate space where (0,0) is at the top left of the native virtual desktop area */ - dixScreenOrigins[index].x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); - dixScreenOrigins[index].y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); + pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); + pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", - index, dixScreenOrigins[index].x, dixScreenOrigins[index].y); + index, pScreen->x, pScreen->y); #if CYGDEBUG || YES winDebug ("winScreenInit - returning\n"); diff --git a/include/globals.h b/include/globals.h index 7de262fe3..8b80a652b 100644 --- a/include/globals.h +++ b/include/globals.h @@ -22,8 +22,6 @@ extern _X_EXPORT int defaultColorVisualClass; extern _X_EXPORT int GrabInProgress; extern _X_EXPORT Bool noTestExtensions; -extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS]; - extern _X_EXPORT char *ConnectionInfo; #ifdef DPMSExtension diff --git a/include/scrnintstr.h b/include/scrnintstr.h index f8171ca5c..d67b26411 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -456,7 +456,7 @@ typedef void (* DeviceCursorCleanupProcPtr)( typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; - short width, height; + short x, y, width, height; short mmWidth, mmHeight; short numDepths; unsigned char rootDepth; diff --git a/mi/miexpose.c b/mi/miexpose.c index ee3ef724a..088149be7 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -424,8 +424,8 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) XID realWin = 0; if(!pWin->parent) { - x = dixScreenOrigins[scrnum].x; - y = dixScreenOrigins[scrnum].y; + x = screenInfo.screens[scrnum]->x; + y = screenInfo.screens[scrnum]->y; pWin = screenInfo.screens[0]->root; realWin = pWin->drawable.id; } else if (scrnum) { diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 5955cd99c..ce088c7dc 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -53,9 +53,9 @@ extern Bool no_configure_window; #ifdef ROOTLESS_GLOBAL_COORDS #define SCREEN_TO_GLOBAL_X \ - (dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX) + (pScreen->x + rootlessGlobalOffsetX) #define SCREEN_TO_GLOBAL_Y \ - (dixScreenOrigins[pScreen->myNum].y + rootlessGlobalOffsetY) + (pScreen->y + rootlessGlobalOffsetY) #else #define SCREEN_TO_GLOBAL_X 0 #define SCREEN_TO_GLOBAL_Y 0 @@ -109,8 +109,8 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; - sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + sx = pWin->drawable.pScreen->x + darwinMainScreenX; + sy = pWin->drawable.pScreen->y + darwinMainScreenY; /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ vlist[0] = (INT16) bounds.x1 - sx; diff --git a/record/record.c b/record/record.c index b81b7b2fa..46231c913 100644 --- a/record/record.c +++ b/record/record.c @@ -43,6 +43,7 @@ and Jim Haggerty of Metheus. #include "swaprep.h" #include "inputstr.h" #include "eventconvert.h" +#include "scrnintstr.h" #include <stdio.h> @@ -755,11 +756,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP, int scr = XineramaGetCursorScreen(inputInfo.pointer); memcpy(&shiftedEvent, pev, sizeof(xEvent)); shiftedEvent.u.keyButtonPointer.rootX += - dixScreenOrigins[scr].x - - dixScreenOrigins[0].x; + screenInfo.screens[scr]->x - + screenInfo.screens[0]->x; shiftedEvent.u.keyButtonPointer.rootY += - dixScreenOrigins[scr].y - - dixScreenOrigins[0].y; + screenInfo.screens[scr]->y - + screenInfo.screens[0]->y; pEvToRecord = &shiftedEvent; } #endif /* PANORAMIX */ diff --git a/render/render.c b/render/render.c index 11c092776..78ecf43b7 100644 --- a/render/render.c +++ b/render/render.c @@ -2832,22 +2832,22 @@ PanoramiXRenderComposite (ClientPtr client) stuff->src = src->info[j].id; if (src->u.pict.root) { - stuff->xSrc = orig.xSrc - dixScreenOrigins[j].x; - stuff->ySrc = orig.ySrc - dixScreenOrigins[j].y; + stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x; + stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { - stuff->xDst = orig.xDst - dixScreenOrigins[j].x; - stuff->yDst = orig.yDst - dixScreenOrigins[j].y; + stuff->xDst = orig.xDst - screenInfo.screens[j]->x; + stuff->yDst = orig.yDst - screenInfo.screens[j]->y; } if (msk) { stuff->mask = msk->info[j].id; if (msk->u.pict.root) { - stuff->xMask = orig.xMask - dixScreenOrigins[j].x; - stuff->yMask = orig.yMask - dixScreenOrigins[j].y; + stuff->xMask = orig.xMask - screenInfo.screens[j]->x; + stuff->yMask = orig.yMask - screenInfo.screens[j]->y; } } result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client); @@ -2881,14 +2881,14 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client) stuff->src = src->info[j].id; if (src->u.pict.root) { - stuff->xSrc = xSrc - dixScreenOrigins[j].x; - stuff->ySrc = ySrc - dixScreenOrigins[j].y; + stuff->xSrc = xSrc - screenInfo.screens[j]->x; + stuff->ySrc = ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { - elt->deltax = origElt.deltax - dixScreenOrigins[j].x; - elt->deltay = origElt.deltay - dixScreenOrigins[j].y; + elt->deltax = origElt.deltax - screenInfo.screens[j]->x; + elt->deltay = origElt.deltay - screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client); if(result != Success) break; @@ -2918,8 +2918,8 @@ PanoramiXRenderFillRectangles (ClientPtr client) if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xRectangle *rects = (xRectangle *) (stuff + 1); @@ -2966,8 +2966,8 @@ PanoramiXRenderTrapezoids(ClientPtr client) FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xTrapezoid *trap = (xTrapezoid *) (stuff + 1); @@ -3026,8 +3026,8 @@ PanoramiXRenderTriangles(ClientPtr client) FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xTriangle *tri = (xTriangle *) (stuff + 1); @@ -3082,8 +3082,8 @@ PanoramiXRenderTriStrip(ClientPtr client) FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); @@ -3134,8 +3134,8 @@ PanoramiXRenderTriFan(ClientPtr client) FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = dixScreenOrigins[j].x; - int y_off = dixScreenOrigins[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); @@ -3188,8 +3188,8 @@ PanoramiXRenderAddTraps (ClientPtr client) if (picture->u.pict.root) { - stuff->xOff = x_off + dixScreenOrigins[j].x; - stuff->yOff = y_off + dixScreenOrigins[j].y; + stuff->xOff = x_off + screenInfo.screens[j]->x; + stuff->yOff = y_off + screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client); if(result != Success) break; |