summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-22 00:26:28 -0700
committerJamey Sharp <jamey@minilop.net>2010-06-03 14:03:23 -0700
commite7fae9ecc42ab5e73b89117722dbf4117d928f9a (patch)
treeb7897e7a64fe01e3989ec1e7a5a7db69797126e6
parent80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 (diff)
Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[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 uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. 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.c2
-rw-r--r--Xext/panoramiXprocs.c14
-rw-r--r--Xext/saver.c6
-rw-r--r--Xi/closedev.c2
-rw-r--r--Xi/exevents.c6
-rw-r--r--Xi/xichangecursor.c2
-rw-r--r--composite/compinit.c2
-rw-r--r--composite/compoverlay.c2
-rw-r--r--dix/devices.c6
-rw-r--r--dix/dispatch.c13
-rw-r--r--dix/enterleave.c12
-rw-r--r--dix/events.c34
-rw-r--r--dix/globals.c2
-rw-r--r--dix/main.c5
-rw-r--r--dix/window.c21
-rw-r--r--fb/fb.h2
-rw-r--r--hw/dmx/dmxextension.c16
-rw-r--r--hw/dmx/input/dmxconsole.c2
-rw-r--r--hw/dmx/input/dmxinputinit.c2
-rw-r--r--hw/kdrive/src/kdrive.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86RandR.c2
-rw-r--r--hw/xfree86/common/xf86xv.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c2
-rw-r--r--hw/xfree86/dri/dri.c2
-rw-r--r--hw/xfree86/dri2/dri2.c2
-rw-r--r--hw/xfree86/modes/xf86RandR12.c6
-rw-r--r--hw/xfree86/modes/xf86Rotate.c4
-rw-r--r--hw/xfree86/xaa/xaaCpyWin.c2
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c2
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c2
-rw-r--r--hw/xquartz/darwin.c2
-rw-r--r--hw/xquartz/quartz.c2
-rw-r--r--hw/xquartz/xpr/xprFrame.c2
-rw-r--r--hw/xquartz/xpr/xprScreen.c4
-rw-r--r--hw/xwin/winkeybd.c2
-rwxr-xr-xhw/xwin/winwin32rootlesswindow.c2
-rw-r--r--hw/xwin/winwindow.c2
-rw-r--r--include/globals.h1
-rw-r--r--include/scrnintstr.h1
-rw-r--r--mi/midispcur.c8
-rw-r--r--mi/miexpose.c2
-rw-r--r--mi/mioverlay.c4
-rw-r--r--miext/rootless/rootlessCommon.c4
-rw-r--r--miext/rootless/rootlessCommon.h2
-rw-r--r--miext/rootless/rootlessScreen.c2
-rw-r--r--miext/rootless/rootlessWindow.c18
-rw-r--r--randr/rrscreen.c10
-rw-r--r--randr/rrxinerama.c2
-rw-r--r--render/render.c2
-rw-r--r--xfixes/cursor.c2
-rw-r--r--xkb/xkbInit.c3
52 files changed, 130 insertions, 128 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 594da0e95..e1cef87a5 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -839,3 +839,3 @@ PanoramiXConsolidate(void)
ScreenPtr pScreen = screenInfo.screens[i];
- root->info[i].id = WindowTable[i]->drawable.id;
+ root->info[i].id = pScreen->root->drawable.id;
root->u.win.class = InputOutput;
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 08ea3ec90..6b199cf7b 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -131,3 +131,3 @@ int PanoramiXCreateWindow(ClientPtr client)
orig_y = stuff->y;
- parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) ||
+ parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
@@ -330,3 +330,3 @@ int PanoramiXReparentWindow(ClientPtr client)
y = stuff->y;
- parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) ||
+ parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) ||
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
@@ -477,3 +477,3 @@ int PanoramiXConfigureWindow(ClientPtr client)
- if(pWin->parent && ((pWin->parent == WindowTable[0]) ||
+ if(pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) ||
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)))
@@ -546,3 +546,3 @@ int PanoramiXGetGeometry(ClientPtr client)
rep.sequenceNumber = client->sequence;
- rep.root = WindowTable[0]->drawable.id;
+ rep.root = screenInfo.screens[0]->root->drawable.id;
rep.depth = pDraw->depth;
@@ -564,3 +564,3 @@ int PanoramiXGetGeometry(ClientPtr client)
rep.y = pWin->origin.y - wBorderWidth (pWin);
- if((pWin->parent == WindowTable[0]) ||
+ if((pWin->parent == screenInfo.screens[0]->root) ||
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
@@ -598,3 +598,3 @@ int PanoramiXTranslateCoords(ClientPtr client)
- if((pWin == WindowTable[0]) ||
+ if((pWin == screenInfo.screens[0]->root) ||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
@@ -636,3 +636,3 @@ int PanoramiXTranslateCoords(ClientPtr client)
rep.dstY = y - pDst->drawable.y;
- if((pDst == WindowTable[0]) ||
+ if((pDst == screenInfo.screens[0]->root) ||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
diff --git a/Xext/saver.c b/Xext/saver.c
index da61fbe60..696c4aa22 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -505,3 +505,3 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
ev.timestamp = currentTime.milliseconds;
- ev.root = WindowTable[pScreen->myNum]->drawable.id;
+ ev.root = pScreen->root->drawable.id;
ev.window = pScreen->screensaver.wid;
@@ -582,3 +582,3 @@ CreateSaverWindow (ScreenPtr pScreen)
- pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum],
+ pWin = CreateWindow (pSaver->wid, pScreen->root,
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
@@ -868,3 +868,3 @@ ScreenSaverSetAttributes (ClientPtr client)
pScreen = pDraw->pScreen;
- pParent = WindowTable[pScreen->myNum];
+ pParent = pScreen->root;
diff --git a/Xi/closedev.c b/Xi/closedev.c
index 159ead55c..e319c737a 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -158,3 +158,3 @@ ProcXCloseDevice(ClientPtr client)
for (i = 0; i < screenInfo.numScreens; i++) {
- pWin = WindowTable[i];
+ pWin = screenInfo.screens[i]->root;
DeleteDeviceEvents(d, pWin, client);
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 41b396c28..56d9bf7fd 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -928,3 +928,3 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
for (i = 0; i < screenInfo.numScreens; i++)
- DeliverEventsToWindow(device, WindowTable[i], xi, 1,
+ DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
GetEventFilter(device, xi), NULL);
@@ -1044,3 +1044,3 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
if (ev->any.type == ET_Motion)
- ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+ ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
@@ -2122,3 +2122,3 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
for (i = 0; i < screenInfo.numScreens; i++) {
- pWin = WindowTable[i];
+ pWin = screenInfo.screens[i]->root;
if (!pWin)
diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
index e72cfac03..215339331 100644
--- a/Xi/xichangecursor.c
+++ b/Xi/xichangecursor.c
@@ -95,3 +95,3 @@ int ProcXIChangeCursor(ClientPtr client)
{
- if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
+ if (pWin == pWin->drawable.pScreen->root)
pCursor = rootCursor;
diff --git a/composite/compinit.c b/composite/compinit.c
index a81cc740f..e4b68c822 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -143,3 +143,3 @@ compScreenUpdate (ScreenPtr pScreen)
{
- compWindowUpdate (WindowTable[pScreen->myNum]);
+ compWindowUpdate (pScreen->root);
cs->damaged = FALSE;
diff --git a/composite/compoverlay.c b/composite/compoverlay.c
index 2158cdb5a..67b566c7f 100644
--- a/composite/compoverlay.c
+++ b/composite/compoverlay.c
@@ -126,3 +126,3 @@ compCreateOverlayWindow (ScreenPtr pScreen)
CompScreenPtr cs = GetCompScreen(pScreen);
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
WindowPtr pWin;
diff --git a/dix/devices.c b/dix/devices.c
index 250a4980d..998d22a4b 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -362,5 +362,5 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
{
- InitializeSprite(dev, WindowTable[0]);
+ InitializeSprite(dev, screenInfo.screens[0]->root);
/* mode doesn't matter */
- EnterWindow(dev, WindowTable[0], NotifyAncestor);
+ EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
}
@@ -2437,3 +2437,3 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
else /* new device auto-set to floating */
- currentRoot = WindowTable[0];
+ currentRoot = screenInfo.screens[0]->root;
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 27cb22022..c0efce5bf 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -564,3 +564,3 @@ CreateConnectionBlock(void)
pScreen = screenInfo.screens[i];
- root.windowId = WindowTable[i]->drawable.id;
+ root.windowId = pScreen->root->drawable.id;
root.defaultColormap = pScreen->defColormap;
@@ -914,3 +914,3 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep)
rep->sequenceNumber = client->sequence;
- rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
+ rep->root = pDraw->pScreen->root->drawable.id;
rep->depth = pDraw->depth;
@@ -974,3 +974,3 @@ ProcQueryTree(ClientPtr client)
reply.type = X_Reply;
- reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
+ reply.root = pWin->drawable.pScreen->root->drawable.id;
reply.sequenceNumber = client->sequence;
@@ -2057,3 +2057,3 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
{
- pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum];
+ pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
}
@@ -3668,5 +3668,5 @@ SendConnSetup(ClientPtr client, char *reason)
xDepth *pDepth;
+ WindowPtr pRoot = screenInfo.screens[i]->root;
- root->currentInputMask = WindowTable[i]->eventMask |
- wOtherEventMasks (WindowTable[i]);
+ root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
pDepth = (xDepth *)(root + 1);
@@ -3918,3 +3918,2 @@ AddScreen(
*/
- WindowTable[i] = NullWindow;
screenInfo.screens[i] = pScreen;
diff --git a/dix/enterleave.c b/dix/enterleave.c
index c08cc3100..eefa7ab8e 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -1079,3 +1079,3 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
{
- root = WindowTable[i];
+ root = screenInfo.screens[i]->root;
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
@@ -1140,3 +1140,3 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev,
{
- root = WindowTable[i];
+ root = screenInfo.screens[i]->root;
if (!HasFocus(root) && !FirstFocusChild(root))
@@ -1171,3 +1171,3 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
{
- root = WindowTable[i];
+ root = screenInfo.screens[i]->root;
if (!HasFocus(root) && !FirstFocusChild(root))
@@ -1281,3 +1281,3 @@ DeviceFocusEvents(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
- DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]);
+ DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root);
}
@@ -1295,3 +1295,3 @@ DeviceFocusEvents(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
- DeviceFocusEvent(dev, XI_FocusIn, mode, in, WindowTable[i]);
+ DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root);
if (to == PointerRootWin)
@@ -1307,3 +1307,3 @@ DeviceFocusEvents(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
- DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]);
+ DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root);
if (to->parent != NullWindow)
diff --git a/dix/events.c b/dix/events.c
index 9e05dc96c..01865969b 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -558,5 +558,6 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
- if(pWin == WindowTable[0]) {
- memcpy(pSprite->windows, WindowTable,
- PanoramiXNumScreens*sizeof(WindowPtr));
+ if(pWin == screenInfo.screens[0]->root) {
+ int i;
+ for (i = 0; i < PanoramiXNumScreens; i++)
+ pSprite->windows[i] = screenInfo.screens[i]->root;
} else {
@@ -621,3 +622,3 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
pSprite->confined = FALSE;
- pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin;
+ pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
@@ -877,3 +878,3 @@ CheckVirtualMotion(
#endif
- RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
+ RootWindow(pDev) = pSprite->hot.pScreen->root;
}
@@ -1125,3 +1126,3 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
if (ev->any.type == ET_Motion)
- ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+ ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id;
@@ -1341,3 +1342,3 @@ playmore:
ConfineCursorToWindow(dev,
- WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum],
+ dev->spriteInfo->sprite->hotPhys.pScreen->root,
TRUE, FALSE);
@@ -1371,3 +1372,3 @@ ScreenRestructured (ScreenPtr pScreen)
ConfineCursorToWindow(pDev,
- WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum],
+ pDev->spriteInfo->sprite->hotPhys.pScreen->root,
TRUE, FALSE);
@@ -2768,3 +2769,3 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
- RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
+ RootWindow(pDev) = pSprite->hot.pScreen->root;
}
@@ -2851,3 +2852,3 @@ WindowsRestructured(void)
/* This was added to support reconfiguration under Xdmx. The problem is
- * that if the 0th screen (i.e., WindowTable[0]) is moved to an origin
+ * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin
* other than 0,0, the information in the private sprite structure must
@@ -2894,3 +2895,3 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
pDev,
- WindowTable[pSprite->hotPhys.pScreen->myNum],
+ pSprite->hotPhys.pScreen->root,
TRUE, FALSE);
@@ -3053,3 +3054,3 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
- win = WindowTable[pScreen->myNum];
+ win = pScreen->root;
@@ -3126,3 +3127,3 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
else
- XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE);
+ XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
/* if the pointer wasn't confined, the DDX won't get
@@ -3141,4 +3142,3 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
if (newScreen != pSprite->hotPhys.pScreen)
- ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum],
- TRUE, FALSE);
+ ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
}
@@ -3217,3 +3217,3 @@ XineramaWarpPointer(ClientPtr client)
winY = source->drawable.y;
- if(source == WindowTable[0]) {
+ if(source == screenInfo.screens[0]->root) {
winX -= panoramiXdataPtr[0].x;
@@ -3233,3 +3233,3 @@ XineramaWarpPointer(ClientPtr client)
y = dest->drawable.y;
- if(dest == WindowTable[0]) {
+ if(dest == screenInfo.screens[0]->root) {
x -= panoramiXdataPtr[0].x;
diff --git a/dix/globals.c b/dix/globals.c
index c24a94fbe..28e7d072d 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -85,4 +85,2 @@ long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
-WindowPtr WindowTable[MAXSCREENS];
-
unsigned long globalSerialNumber = 0;
diff --git a/dix/main.c b/dix/main.c
index 3e500ba4d..982fedd6b 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -251,3 +251,3 @@ int main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numScreens; i++)
- InitRootWindow(WindowTable[i]);
+ InitRootWindow(screenInfo.screens[i]->root);
@@ -305,3 +305,4 @@ int main(int argc, char *argv[], char *envp[])
- memset(WindowTable, 0, sizeof(WindowTable));
+ for (i = 0; i < screenInfo.numScreens; i++)
+ screenInfo.screens[i]->root = NullWindow;
CloseDownDevices();
diff --git a/dix/window.c b/dix/window.c
index bdad749e8..71edd4681 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -212,3 +212,3 @@ PrintWindowTree(void)
ErrorF("[dix] WINDOW %d\n", i);
- pWin = WindowTable[i];
+ pWin = screenInfo.screens[i]->root;
miPrintRegion(&pWin->clipList);
@@ -258,3 +258,3 @@ WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
{
- return(TraverseTree(WindowTable[pScreen->myNum], func, data));
+ return(TraverseTree(pScreen->root, func, data));
}
@@ -368,3 +368,3 @@ CreateRootWindow(ScreenPtr pScreen)
- WindowTable[pScreen->myNum] = pWin;
+ pScreen->root = pWin;
@@ -1329,3 +1329,3 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
{
- if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
+ if (pWin == pWin->drawable.pScreen->root)
pCursor = rootCursor;
@@ -2966,3 +2966,3 @@ HandleSaveSet(ClientPtr client)
if (SaveSetToRoot(client->saveSet[j]))
- pParent = WindowTable[pWin->drawable.pScreen->myNum];
+ pParent = pWin->drawable.pScreen->root;
else
@@ -3252,3 +3252,2 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
{
- int i = pScreen->myNum;
int j;
@@ -3268,5 +3267,5 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
case SCREEN_IS_TILED:
- switch (WindowTable[i]->backgroundState) {
+ switch (pScreen->root->backgroundState) {
case BackgroundPixel:
- attributes[attri++] = WindowTable[i]->background.pixel;
+ attributes[attri++] = pScreen->root->background.pixel;
mask |= CWBackPixel;
@@ -3282,3 +3281,3 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
case SCREEN_IS_BLACK:
- attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel;
+ attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel;
mask |= CWBackPixel;
@@ -3331,3 +3330,3 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
CreateWindow(pScreen->screensaver.wid,
- WindowTable[i],
+ pScreen->root,
-RANDOM_WIDTH, -RANDOM_WIDTH,
@@ -3336,3 +3335,3 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
0, InputOutput, mask, attributes, 0, serverClient,
- wVisual (WindowTable[i]), &result);
+ wVisual (pScreen->root), &result);
diff --git a/fb/fb.h b/fb/fb.h
index 91c91eeb2..e2222a5c7 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -742,3 +742,3 @@ typedef struct {
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
- &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
+ &(pWin)->drawable.pScreen->root->borderClip)
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index c8e8dae65..678f29054 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -299,3 +299,3 @@ void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
WindowPtr pChild;
@@ -404,3 +404,3 @@ static void dmxConfigureRootWindow(int idx, int x, int y, int w, int h)
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
- WindowPtr pRoot = WindowTable[idx];
+ WindowPtr pRoot = screenInfo.screens[idx]->root;
@@ -439,3 +439,3 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
ScreenPtr pScreen = screenInfo.screens[idx];
- WindowPtr pRoot = WindowTable[idx];
+ WindowPtr pRoot = pScreen->root;
WindowPtr pChild;
@@ -460,3 +460,3 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
/* Adjust each of the root window's children */
- if (!idx) ReinitializeRootWindow(WindowTable[0], xoff, yoff);
+ if (!idx) ReinitializeRootWindow(screenInfo.screens[0]->root, xoff, yoff);
pChild = pRoot->firstChild;
@@ -636,3 +636,3 @@ int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs)
ScreenPtr pScreen = screenInfo.screens[i];
- WindowPtr pChild = WindowTable[i]->firstChild;
+ WindowPtr pChild = pScreen->root->firstChild;
while (pChild) {
@@ -916,3 +916,3 @@ static void dmxBECreateWindowTree(int idx)
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
- WindowPtr pRoot = WindowTable[idx];
+ WindowPtr pRoot = screenInfo.screens[idx]->root;
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
@@ -984,3 +984,3 @@ static void dmxForceExposures(int idx)
ScreenPtr pScreen = screenInfo.screens[idx];
- WindowPtr pRoot = WindowTable[idx];
+ WindowPtr pRoot = pScreen->root;
Bool anyMarked = FALSE;
@@ -1512,3 +1512,3 @@ static void dmxBEDestroyWindowTree(int idx)
{
- WindowPtr pWin = WindowTable[idx];
+ WindowPtr pWin = screenInfo.screens[idx]->root;
WindowPtr pChild = pWin;
diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c
index 9542efacd..bf34169ab 100644
--- a/hw/dmx/input/dmxconsole.c
+++ b/hw/dmx/input/dmxconsole.c
@@ -206,3 +206,3 @@ static void dmxConsoleDrawWindows(pointer private)
for (i = 0; i < dmxNumScreens; i++) {
- WindowPtr pRoot = WindowTable[i];
+ WindowPtr pRoot = screenInfo.screens[i]->root;
WindowPtr pChild;
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 1242be1bd..814fc1a89 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -572,3 +572,3 @@ static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
#ifdef PANORAMIX
- if (!noPanoramiXExtension && pWindow && pWindow->parent != WindowTable[0])
+ if (!noPanoramiXExtension && pWindow && pWindow->parent != screenInfo.screens[0]->root)
return;
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 9d1b38376..10df02dbc 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -97,3 +97,3 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{
- WindowPtr pWin = WindowTable[pScreen->myNum];
+ WindowPtr pWin = pScreen->root;
WindowPtr pChild;
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index d4b935157..1aad2d100 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1064,3 +1064,3 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
- WindowPtr pWin = WindowTable[pScreen->myNum];
+ WindowPtr pWin = pScreen->root;
WindowPtr pChild;
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 455a02cc2..77053b8c2 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -161,3 +161,3 @@ xf86RandRSetMode (ScreenPtr pScreen,
int oldVirtualY = scrp->virtualY;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
Bool ret = TRUE;
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 2b33f2585..efed677af 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1883,3 +1883,3 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
{
- DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
+ DrawablePtr root = &pScreen->root->drawable;
ChangeGCVal pval[2];
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 754fe372c..448762879 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -349,3 +349,3 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
ev.timestamp = currentTime.milliseconds;
- ev.root = WindowTable[pScreen->myNum]->drawable.id;
+ ev.root = pScreen->root->drawable.id;
ev.kind = kind;
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 77f7fe295..f7cea5ede 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1189,3 +1189,3 @@ DRIDriverClipNotify(ScreenPtr pScreen)
pDRIPriv->nrWalked = 0;
- TraverseTree(WindowTable[pScreen->myNum], DRIDCNTreeTraversal,
+ TraverseTree(pScreen->root, DRIDCNTreeTraversal,
(pointer)pDRIWindows);
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 556285383..9ec4caa54 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -609,3 +609,3 @@ DRI2CanFlip(DrawablePtr pDraw)
- pRoot = WindowTable[pScreen->myNum];
+ pRoot = pScreen->root;
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 9dfce3fed..8d598d6e7 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -519,3 +519,3 @@ xf86RandR12SetMode (ScreenPtr pScreen,
int oldmmHeight = pScreen->mmHeight;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
DisplayModePtr currentMode = NULL;
@@ -687,3 +687,3 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
@@ -741,3 +741,3 @@ finish:
#if RANDR_12_INTERFACE
- if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
+ if (xf86RandR12Key && pScreen->root && ret)
RRScreenSizeNotify (pScreen);
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 2714fee51..e3683a8ed 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -78,5 +78,5 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
ScreenPtr screen = scrn->pScreen;
- WindowPtr root = WindowTable[screen->myNum];
+ WindowPtr root = screen->root;
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
- PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
+ PictFormatPtr format = compWindowFormat (screen->root);
int error;
diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c
index d37c8ec1e..d58db8ea1 100644
--- a/hw/xfree86/xaa/xaaCpyWin.c
+++ b/hw/xfree86/xaa/xaaCpyWin.c
@@ -49,3 +49,3 @@ XAACopyWindow(
- pwinRoot = WindowTable[pScreen->myNum];
+ pwinRoot = pScreen->root;
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 2af808396..14de9bd34 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -56,3 +56,3 @@ XAACopyWindow8_32(
- pwinRoot = WindowTable[pScreen->myNum];
+ pwinRoot = pScreen->root;
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 3b848ac84..b186cb5cd 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -326,3 +326,3 @@ XAAOverCopyWindow(
int i, nbox, dx, dy;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 580fe4ae0..825afa0de 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -795,3 +795,3 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
{
- WindowPtr pWin = WindowTable[pScreen->myNum];
+ WindowPtr pWin = pScreen->root;
WindowPtr pChild;
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 36d18eba3..ac7fedd13 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -278,3 +278,3 @@ void QuartzUpdateScreens(void) {
/* Adjust the root window. */
- pRoot = WindowTable[pScreen->myNum];
+ pRoot = pScreen->root;
AppleWMSetScreenOrigin(pRoot);
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
@@ -578,3 +578,3 @@ xprHideWindows(Bool hide)
RootlessFrameID prevWid = NULL;
- pRoot = WindowTable[screenInfo.screens[screen]->myNum];
+ pRoot = screenInfo.screens[screen]->root;
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
@@ -399,3 +399,3 @@ xprUpdateScreen(ScreenPtr pScreen)
- AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]);
+ AppleWMSetScreenOrigin(pScreen->root);
@@ -418,3 +418,3 @@ xprInitInput(int argc, char **argv)
for (i = 0; i < screenInfo.numScreens; i++)
- AppleWMSetScreenOrigin(WindowTable[i]);
+ AppleWMSetScreenOrigin(screenInfo.screens[i]->root);
}
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index ad9e66a0b..6d91ce0d6 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -264,3 +264,3 @@ winRestoreModeKeyStates (void)
* will cause segfaults otherwise */
- if (WindowTable && WindowTable[0] && WindowTable[0]->mapped == FALSE)
+ if (screenInfo.screens[0]->root && screenInfo.screens[0]->root->mapped == FALSE)
processEvents = FALSE;
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 3a49ead69..214e8954b 100755
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -409,3 +409,3 @@ winMWExtWMRestackWindows (ScreenPtr pScreen)
winScreenPriv(pScreen);
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
WindowPtr pWin = NULL;
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index d0c360f34..9348d5c1c 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -146,3 +146,3 @@ winCopyWindowNativeGDI (WindowPtr pWin,
/* Get a pointer to the root window */
- pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
+ pwinRoot = pWin->drawable.pScreen->root;
diff --git a/include/globals.h b/include/globals.h
index 6959fc71a..7de262fe3 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -21,3 +21,2 @@ extern _X_EXPORT int defaultColorVisualClass;
-extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
extern _X_EXPORT int GrabInProgress;
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 1460bc4c6..f8171ca5c 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -480,2 +480,3 @@ typedef struct _Screen {
VisualPtr visuals;
+ WindowPtr root;
ScreenSaverStuffRec screensaver;
diff --git a/mi/midispcur.c b/mi/midispcur.c
index c279010e6..87eb27d4e 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -407,3 +407,3 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
miDCScreenKey);
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
pBuffer = MIDCBUFFER(pDev, pScreen);
@@ -450,3 +450,3 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
pSave = pBuffer->pSave;
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
@@ -484,3 +484,3 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
if (!pSave)
@@ -515,3 +515,3 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
- pWin = WindowTable[pScreen->myNum];
+ pWin = pScreen->root;
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 57968dd2a..9249ca9f9 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -428,3 +428,3 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
y = panoramiXdataPtr[scrnum].y;
- pWin = WindowTable[0];
+ pWin = screenInfo.screens[0]->root;
realWin = pWin->drawable.id;
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 1a3ac4185..da3ff4ae7 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -308,3 +308,3 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
/* This could probably be more optimal */
- RebuildTree(WindowTable[pWin->drawable.pScreen->myNum]->firstChild);
+ RebuildTree(pWin->drawable.pScreen->root->firstChild);
}
@@ -1612,3 +1612,3 @@ miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
{
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index 39a3eed0f..dd3f953ca 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -449,3 +449,3 @@ RootlessRepositionWindows(ScreenPtr pScreen)
{
- WindowPtr root = WindowTable[pScreen->myNum];
+ WindowPtr root = pScreen->root;
WindowPtr win;
@@ -470,3 +470,3 @@ RootlessRedisplayScreen(ScreenPtr pScreen)
{
- WindowPtr root = WindowTable[pScreen->myNum];
+ WindowPtr root = pScreen->root;
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index f44c4e8cf..8a4b81321 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -215,3 +215,3 @@ extern RegionRec rootlessHugeRoot;
#define IsRoot(pWin) \
- ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum])
+ ((pWin) == (pWin)->drawable.pScreen->root)
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 7a24af842..d24ca04ad 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -495,3 +495,3 @@ RootlessScreenExpose (ScreenPtr pScreen)
{
- expose_1 (WindowTable[pScreen->myNum]);
+ expose_1 (pScreen->root);
}
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 22a548a0f..5955cd99c 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -1519,3 +1519,3 @@ RootlessOrderAllWindows (void)
if (screenInfo.screens[i] == NULL) continue;
- pWin = WindowTable[i];
+ pWin = screenInfo.screens[i]->root;
if (pWin == NULL) continue;
@@ -1535,3 +1535,3 @@ RootlessEnableRoot (ScreenPtr pScreen)
WindowPtr pRoot;
- pRoot = WindowTable[pScreen->myNum];
+ pRoot = pScreen->root;
@@ -1548,3 +1548,3 @@ RootlessDisableRoot (ScreenPtr pScreen)
- pRoot = WindowTable[pScreen->myNum];
+ pRoot = pScreen->root;
winRec = WINREC (pRoot);
@@ -1574,4 +1574,6 @@ RootlessHideAllWindows (void)
pScreen = screenInfo.screens[i];
- pWin = WindowTable[i];
- if (pScreen == NULL || pWin == NULL)
+ if (pScreen == NULL)
+ continue;
+ pWin = pScreen->root;
+ if (pWin == NULL)
continue;
@@ -1611,4 +1613,6 @@ RootlessShowAllWindows (void)
pScreen = screenInfo.screens[i];
- pWin = WindowTable[i];
- if (pScreen == NULL || pWin == NULL)
+ if (pScreen == NULL)
+ continue;
+ pWin = pScreen->root;
+ if (pWin == NULL)
continue;
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index a940f8aae..a2a0f36a6 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -75,3 +75,3 @@ RRSendConfigNotify (ScreenPtr pScreen)
{
- WindowPtr pWin = WindowTable[pScreen->myNum];
+ WindowPtr pWin = pScreen->root;
xEvent event;
@@ -99,3 +99,3 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
@@ -622,3 +622,3 @@ ProcRRGetScreenInfo (ClientPtr client)
rep.length = 0;
- rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
+ rep.root = pWin->drawable.pScreen->root->drawable.id;
rep.timestamp = currentTime.milliseconds;
@@ -651,3 +651,3 @@ ProcRRGetScreenInfo (ClientPtr client)
rep.length = 0;
- rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
+ rep.root = pWin->drawable.pScreen->root->drawable.id;
rep.timestamp = pScrPriv->lastSetTime.milliseconds;
@@ -963,3 +963,3 @@ sendReply:
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
- rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
+ rep.root = pDraw->pScreen->root->drawable.id;
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 457b2b40f..c1bd5bb33 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -218,3 +218,3 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
pScreen = pWin->drawable.pScreen;
- pRoot = WindowTable[pScreen->myNum];
+ pRoot = pScreen->root;
diff --git a/render/render.c b/render/render.c
index b58dd3ebe..d34250227 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2683,3 +2683,3 @@ PanoramiXRenderCreatePicture (ClientPtr client)
if (refDraw->type == XRT_WINDOW &&
- stuff->drawable == WindowTable[0]->drawable.id)
+ stuff->drawable == screenInfo.screens[0]->root->drawable.id)
{
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index d3a207ddb..5f08db7a5 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -692,3 +692,3 @@ ReplaceCursor (CursorPtr pCursor,
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
- WindowHasNewCursor (WindowTable[0]);
+ WindowHasNewCursor (screenInfo.screens[0]->root);
}
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 93175c538..0f3ffa468 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -45,2 +45,3 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "property.h"
+#include "scrnintstr.h"
#define XKBSRV_NEED_FILE_FUNCS
@@ -212,3 +213,3 @@ char * pval;
}
- dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
+ dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
PropModeReplace, len, pval, TRUE);