diff options
Diffstat (limited to 'hw/xquartz')
-rw-r--r-- | hw/xquartz/applewm.c | 6 | ||||
-rw-r--r-- | hw/xquartz/darwin.c | 24 | ||||
-rw-r--r-- | hw/xquartz/darwinEvents.c | 4 | ||||
-rw-r--r-- | hw/xquartz/pseudoramiX.c | 4 | ||||
-rw-r--r-- | hw/xquartz/quartz.c | 14 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprCursor.c | 4 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprFrame.c | 2 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprScreen.c | 4 |
8 files changed, 30 insertions, 32 deletions
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 580fe4ae0..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); } } } @@ -793,7 +793,7 @@ void AbortDDX( void ) void xf86SetRootClip (ScreenPtr pScreen, int enable) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = TRUE; 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/pseudoramiX.c b/hw/xquartz/pseudoramiX.c index 5868ab129..298ec2be9 100644 --- a/hw/xquartz/pseudoramiX.c +++ b/hw/xquartz/pseudoramiX.c @@ -255,9 +255,9 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client) rep.sequenceNumber = client->sequence; /* screen dimensions */ rep.width = pseudoramiXScreens[stuff->screen].w; - // was panoramiXdataPtr[stuff->screen].width; + // was screenInfo.screens[stuff->screen]->width; rep.height = pseudoramiXScreens[stuff->screen].h; - // was panoramiXdataPtr[stuff->screen].height; + // was screenInfo.screens[stuff->screen]->height; if (client->swapped) { swaps (&rep.sequenceNumber, n); swapl (&rep.length, n); diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 36d18eba3..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,14 +269,14 @@ 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 = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); @@ -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/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c index 53dde7acc..6dc2c87fa 100644 --- a/hw/xquartz/xpr/xprFrame.c +++ b/hw/xquartz/xpr/xprFrame.c @@ -576,7 +576,7 @@ xprHideWindows(Bool hide) for (screen = 0; screen < screenInfo.numScreens; screen++) { RootlessFrameID prevWid = NULL; - pRoot = WindowTable[screenInfo.screens[screen]->myNum]; + pRoot = screenInfo.screens[screen]->root; for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { RootlessWindowRec *winRec = WINREC(pWin); diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index d574721b3..87e97d4e2 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -397,7 +397,7 @@ xprUpdateScreen(ScreenPtr pScreen) rootlessGlobalOffsetX = darwinMainScreenX; rootlessGlobalOffsetY = darwinMainScreenY; - AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); + AppleWMSetScreenOrigin(pScreen->root); RootlessRepositionWindows(pScreen); RootlessUpdateScreenPixmap(pScreen); @@ -416,7 +416,7 @@ xprInitInput(int argc, char **argv) rootlessGlobalOffsetY = darwinMainScreenY; for (i = 0; i < screenInfo.numScreens; i++) - AppleWMSetScreenOrigin(WindowTable[i]); + AppleWMSetScreenOrigin(screenInfo.screens[i]->root); } /* |