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)
This commit is contained in:
Jamey Sharp 2010-05-22 00:26:28 -07:00
parent 80b5d3a326
commit e7fae9ecc4
52 changed files with 130 additions and 128 deletions

View File

@ -837,7 +837,7 @@ PanoramiXConsolidate(void)
for (i = 0; i < PanoramiXNumScreens; i++) {
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;
root->u.win.root = TRUE;
saver->info[i].id = pScreen->screensaver.wid;

View File

@ -129,7 +129,7 @@ int PanoramiXCreateWindow(ClientPtr client)
orig_visual = stuff->visual;
orig_x = stuff->x;
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);
FOR_NSCREENS_BACKWARD(j) {
stuff->wid = newWin->info[j].id;
@ -328,7 +328,7 @@ int PanoramiXReparentWindow(ClientPtr client)
x = stuff->x;
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);
FOR_NSCREENS_BACKWARD(j) {
stuff->window = win->info[j].id;
@ -475,7 +475,7 @@ 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)))
{
if ((Mask)stuff->mask & CWX) {
@ -544,7 +544,7 @@ int PanoramiXGetGeometry(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.root = WindowTable[0]->drawable.id;
rep.root = screenInfo.screens[0]->root->drawable.id;
rep.depth = pDraw->depth;
rep.width = pDraw->width;
rep.height = pDraw->height;
@ -562,7 +562,7 @@ int PanoramiXGetGeometry(ClientPtr client)
WindowPtr pWin = (WindowPtr)pDraw;
rep.x = pWin->origin.x - wBorderWidth (pWin);
rep.y = pWin->origin.y - wBorderWidth (pWin);
if((pWin->parent == WindowTable[0]) ||
if((pWin->parent == screenInfo.screens[0]->root) ||
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
{
rep.x += panoramiXdataPtr[0].x;
@ -596,7 +596,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
rep.sameScreen = xTrue;
rep.child = None;
if((pWin == WindowTable[0]) ||
if((pWin == screenInfo.screens[0]->root) ||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
{
x = stuff->srcX - panoramiXdataPtr[0].x;
@ -634,7 +634,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
}
rep.dstX = x - pDst->drawable.x;
rep.dstY = y - pDst->drawable.y;
if((pDst == WindowTable[0]) ||
if((pDst == screenInfo.screens[0]->root) ||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
{
rep.dstX += panoramiXdataPtr[0].x;

View File

@ -503,7 +503,7 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
ev.state = state;
ev.timestamp = currentTime.milliseconds;
ev.root = WindowTable[pScreen->myNum]->drawable.id;
ev.root = pScreen->root->drawable.id;
ev.window = pScreen->screensaver.wid;
ev.kind = kind;
ev.forced = forced;
@ -580,7 +580,7 @@ CreateSaverWindow (ScreenPtr pScreen)
if (GrabInProgress && GrabInProgress != pAttr->client->index)
return FALSE;
pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum],
pWin = CreateWindow (pSaver->wid, pScreen->root,
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
pAttr->borderWidth, pAttr->class,
pAttr->mask, (XID *)pAttr->values,
@ -866,7 +866,7 @@ ScreenSaverSetAttributes (ClientPtr client)
if (ret != Success)
return ret;
pScreen = pDraw->pScreen;
pParent = WindowTable[pScreen->myNum];
pParent = pScreen->root;
ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess);
if (ret != Success)

View File

@ -156,7 +156,7 @@ ProcXCloseDevice(ClientPtr client)
* Delete passive grabs from all windows for this device. */
for (i = 0; i < screenInfo.numScreens; i++) {
pWin = WindowTable[i];
pWin = screenInfo.screens[i]->root;
DeleteDeviceEvents(d, pWin, client);
p1 = pWin->firstChild;
DeleteEventsFromChildren(d, p1, client);

View File

@ -926,7 +926,7 @@ 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);
free(xi);
}
@ -1042,7 +1042,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
/* see comment in EnqueueEvents regarding the next three lines */
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;
eventinfo.device = device;
eventinfo.event = ev;
@ -2120,7 +2120,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
WindowPtr pWin, p1;
for (i = 0; i < screenInfo.numScreens; i++) {
pWin = WindowTable[i];
pWin = screenInfo.screens[i]->root;
if (!pWin)
continue;
DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);

View File

@ -93,7 +93,7 @@ int ProcXIChangeCursor(ClientPtr client)
if (stuff->cursor == None)
{
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
if (pWin == pWin->drawable.pScreen->root)
pCursor = rootCursor;
else
pCursor = (CursorPtr)None;

View File

@ -141,7 +141,7 @@ compScreenUpdate (ScreenPtr pScreen)
compCheckTree (pScreen);
if (cs->damaged)
{
compWindowUpdate (WindowTable[pScreen->myNum]);
compWindowUpdate (pScreen->root);
cs->damaged = FALSE;
}
}

View File

@ -124,7 +124,7 @@ Bool
compCreateOverlayWindow (ScreenPtr pScreen)
{
CompScreenPtr cs = GetCompScreen(pScreen);
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
WindowPtr pWin;
XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
int result;

View File

@ -360,9 +360,9 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
/* Sprites appear on first root window, so we can hardcode it */
if (dev->spriteInfo->spriteOwner)
{
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);
}
else if ((other = NextFreePointerDevice()) == NULL)
{
@ -2435,7 +2435,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
if (dev->spriteInfo->sprite)
currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
else /* new device auto-set to floating */
currentRoot = WindowTable[0];
currentRoot = screenInfo.screens[0]->root;
/* we need to init a fake sprite */
screen = currentRoot->drawable.pScreen;

View File

@ -562,7 +562,7 @@ CreateConnectionBlock(void)
VisualPtr pVisual;
pScreen = screenInfo.screens[i];
root.windowId = WindowTable[i]->drawable.id;
root.windowId = pScreen->root->drawable.id;
root.defaultColormap = pScreen->defColormap;
root.whitePixel = pScreen->whitePixel;
root.blackPixel = pScreen->blackPixel;
@ -912,7 +912,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep)
rep->type = X_Reply;
rep->length = 0;
rep->sequenceNumber = client->sequence;
rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
rep->root = pDraw->pScreen->root->drawable.id;
rep->depth = pDraw->depth;
rep->width = pDraw->width;
rep->height = pDraw->height;
@ -972,7 +972,7 @@ ProcQueryTree(ClientPtr client)
return rc;
memset(&reply, 0, sizeof(xQueryTreeReply));
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;
if (pWin->parent)
reply.parent = pWin->parent->drawable.id;
@ -2055,7 +2055,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
}
else
{
pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum];
pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
}
xgi.visual = wVisual (pWin);
@ -3666,9 +3666,9 @@ SendConnSetup(ClientPtr client, char *reason)
{
unsigned int j;
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);
for (j = 0; j < root->nDepths; j++)
{
@ -3916,7 +3916,6 @@ AddScreen(
any of the strings pointed to by argv. They may be passed to
multiple screens.
*/
WindowTable[i] = NullWindow;
screenInfo.screens[i] = pScreen;
screenInfo.numScreens++;
if (!(*pfnInit)(i, pScreen, argc, argv))

View File

@ -1077,7 +1077,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
{
root = WindowTable[i];
root = screenInfo.screens[i]->root;
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
{
/* If pointer was on PointerRootWin and changes to NoneWin, and
@ -1138,7 +1138,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
{
root = WindowTable[i];
root = screenInfo.screens[i]->root;
if (!HasFocus(root) && !FirstFocusChild(root))
{
CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
@ -1169,7 +1169,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
{
root = WindowTable[i];
root = screenInfo.screens[i]->root;
if (!HasFocus(root) && !FirstFocusChild(root))
{
/* If pointer was on PointerRootWin and changes to NoneWin, and
@ -1279,7 +1279,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer);
/* Notify all the roots */
for (i = 0; i < nscreens; i++)
DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]);
DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root);
}
else
{
@ -1293,7 +1293,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
}
/* Notify all the roots */
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)
DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer);
}
@ -1305,7 +1305,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode,
NotifyPointer);
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)
DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to);

View File

@ -556,9 +556,10 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
{
SpritePtr pSprite = pDev->spriteInfo->sprite;
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 {
PanoramiXRes *win;
int rc, i;
@ -619,7 +620,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
pSprite->hotShape = NullRegion;
pSprite->confined = FALSE;
pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin;
pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin;
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
}
@ -875,7 +876,7 @@ CheckVirtualMotion(
#ifdef PANORAMIX
if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
#endif
RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
RootWindow(pDev) = pSprite->hot.pScreen->root;
}
static void
@ -1123,7 +1124,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
* updated yet.
*/
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;
eventinfo.event = ev;
eventinfo.device = device;
@ -1339,7 +1340,7 @@ playmore:
}
else
ConfineCursorToWindow(dev,
WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum],
dev->spriteInfo->sprite->hotPhys.pScreen->root,
TRUE, FALSE);
PostNewCursor(dev);
}
@ -1369,7 +1370,7 @@ ScreenRestructured (ScreenPtr pScreen)
}
else
ConfineCursorToWindow(pDev,
WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum],
pDev->spriteInfo->sprite->hotPhys.pScreen->root,
TRUE, FALSE);
}
}
@ -2766,7 +2767,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
{
pSprite->hot.pScreen = pSprite->hotPhys.pScreen;
RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
RootWindow(pDev) = pSprite->hot.pScreen->root;
}
}
@ -2849,7 +2850,7 @@ WindowsRestructured(void)
#ifdef PANORAMIX
/* 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
* be updated accordingly, or XYToWindow (and other routines) will not
* compute correctly. */
@ -2892,7 +2893,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
} else
ConfineCursorToWindow(
pDev,
WindowTable[pSprite->hotPhys.pScreen->myNum],
pSprite->hotPhys.pScreen->root,
TRUE, FALSE);
}
@ -3051,7 +3052,7 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
pSprite = pDev->spriteInfo->sprite;
win = WindowTable[pScreen->myNum];
win = pScreen->root;
pSprite->hotPhys.pScreen = pScreen;
pSprite->hot = pSprite->hotPhys;
@ -3124,7 +3125,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
XineramaConfineCursorToWindow(pDev,
pSprite->confineWin, TRUE);
else
XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE);
XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
/* if the pointer wasn't confined, the DDX won't get
told of the pointer warp so we reposition it here */
if(!syncEvents.playingEvents)
@ -3139,8 +3140,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
} else
#endif
if (newScreen != pSprite->hotPhys.pScreen)
ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum],
TRUE, FALSE);
ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
}
#ifdef PANORAMIX
@ -3215,7 +3215,7 @@ XineramaWarpPointer(ClientPtr client)
winX = source->drawable.x;
winY = source->drawable.y;
if(source == WindowTable[0]) {
if(source == screenInfo.screens[0]->root) {
winX -= panoramiXdataPtr[0].x;
winY -= panoramiXdataPtr[0].y;
}
@ -3231,7 +3231,7 @@ XineramaWarpPointer(ClientPtr client)
if (dest) {
x = dest->drawable.x;
y = dest->drawable.y;
if(dest == WindowTable[0]) {
if(dest == screenInfo.screens[0]->root) {
x -= panoramiXdataPtr[0].x;
y -= panoramiXdataPtr[0].y;
}

View File

@ -83,8 +83,6 @@ ClientPtr serverClient;
int currentMaxClients; /* current size of clients array */
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
WindowPtr WindowTable[MAXSCREENS];
unsigned long globalSerialNumber = 0;
unsigned long serverGeneration = 0;

View File

@ -249,7 +249,7 @@ int main(int argc, char *argv[], char *envp[])
#endif
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(WindowTable[i]);
InitRootWindow(screenInfo.screens[i]->root);
InitCoreDevices();
InitInput(argc, argv);
@ -303,7 +303,8 @@ int main(int argc, char *argv[], char *envp[])
CloseInput();
memset(WindowTable, 0, sizeof(WindowTable));
for (i = 0; i < screenInfo.numScreens; i++)
screenInfo.screens[i]->root = NullWindow;
CloseDownDevices();
CloseDownEvents();

View File

@ -210,7 +210,7 @@ PrintWindowTree(void)
for (i=0; i<screenInfo.numScreens; i++)
{
ErrorF("[dix] WINDOW %d\n", i);
pWin = WindowTable[i];
pWin = screenInfo.screens[i]->root;
miPrintRegion(&pWin->clipList);
p1 = pWin->firstChild;
PrintChildren(p1, 4);
@ -256,7 +256,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
int
WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
{
return(TraverseTree(WindowTable[pScreen->myNum], func, data));
return(TraverseTree(pScreen->root, func, data));
}
/* hack for forcing backing store on all windows */
@ -366,7 +366,7 @@ CreateRootWindow(ScreenPtr pScreen)
pScreen->screensaver.ExternalScreenSaver = NULL;
screenIsSaved = SCREEN_SAVER_OFF;
WindowTable[pScreen->myNum] = pWin;
pScreen->root = pWin;
pWin->drawable.pScreen = pScreen;
pWin->drawable.type = DRAWABLE_WINDOW;
@ -1327,7 +1327,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
*/
if ( cursorID == None)
{
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
if (pWin == pWin->drawable.pScreen->root)
pCursor = rootCursor;
else
pCursor = (CursorPtr) None;
@ -2964,7 +2964,7 @@ HandleSaveSet(ClientPtr client)
pWin = SaveSetWindow(client->saveSet[j]);
#ifdef XFIXES
if (SaveSetToRoot(client->saveSet[j]))
pParent = WindowTable[pWin->drawable.pScreen->myNum];
pParent = pWin->drawable.pScreen->root;
else
#endif
{
@ -3250,7 +3250,6 @@ SaveScreens(int on, int mode)
static Bool
TileScreenSaver(ScreenPtr pScreen, int kind)
{
int i = pScreen->myNum;
int j;
int result;
XID attributes[3];
@ -3266,9 +3265,9 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
attri = 0;
switch (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;
break;
case BackgroundPixmap:
@ -3280,7 +3279,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
}
break;
case SCREEN_IS_BLACK:
attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel;
attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel;
mask |= CWBackPixel;
break;
}
@ -3329,12 +3328,12 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
pWin = pScreen->screensaver.pWindow =
CreateWindow(pScreen->screensaver.wid,
WindowTable[i],
pScreen->root,
-RANDOM_WIDTH, -RANDOM_WIDTH,
(unsigned short)pScreen->width + RANDOM_WIDTH,
(unsigned short)pScreen->height + RANDOM_WIDTH,
0, InputOutput, mask, attributes, 0, serverClient,
wVisual (WindowTable[i]), &result);
wVisual (pScreen->root), &result);
if (cursor)
FreeResource (cursorID, RT_NONE);

View File

@ -740,7 +740,7 @@ typedef struct {
#define fbWindowEnabled(pWin) \
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
&(pWin)->drawable.pScreen->root->borderClip)
#define fbDrawableEnabled(pDrawable) \
((pDrawable)->type == DRAWABLE_PIXMAP ? \

View File

@ -297,7 +297,7 @@ void dmxFlushPendingSyncs(void)
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;
Bool anyMarked = FALSE;
@ -402,7 +402,7 @@ static void dmxConfigureScreenWindow(int idx,
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;
/* NOTE: Either this function or the ones that it calls must handle
* the case where w == 0 || h == 0. Currently, the functions that
@ -437,7 +437,7 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
{
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
ScreenPtr pScreen = screenInfo.screens[idx];
WindowPtr pRoot = WindowTable[idx];
WindowPtr pRoot = pScreen->root;
WindowPtr pChild;
int xoff;
int yoff;
@ -458,7 +458,7 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
XineramaReinitData(pScreen);
/* 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;
while (pChild) {
/* Adjust child window's position */
@ -634,7 +634,7 @@ int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs)
int i;
for (i = 0; i < dmxNumScreens; i++) {
ScreenPtr pScreen = screenInfo.screens[i];
WindowPtr pChild = WindowTable[i]->firstChild;
WindowPtr pChild = pScreen->root->firstChild;
while (pChild) {
/* Adjust child window's position */
pScreen->MoveWindow(pChild,
@ -914,7 +914,7 @@ static void dmxBECreateResources(pointer value, XID id, RESTYPE type,
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);
WindowPtr pWin;
@ -982,7 +982,7 @@ static void dmxBECreateWindowTree(int idx)
static void dmxForceExposures(int idx)
{
ScreenPtr pScreen = screenInfo.screens[idx];
WindowPtr pRoot = WindowTable[idx];
WindowPtr pRoot = pScreen->root;
Bool anyMarked = FALSE;
WindowPtr pChild;
@ -1510,7 +1510,7 @@ static void dmxBEDestroyScratchGCs(int scrnNum)
* destroy a window as well as all of it's children. */
static void dmxBEDestroyWindowTree(int idx)
{
WindowPtr pWin = WindowTable[idx];
WindowPtr pWin = screenInfo.screens[idx]->root;
WindowPtr pChild = pWin;
while (1) {

View File

@ -204,7 +204,7 @@ static void dmxConsoleDrawWindows(pointer private)
XUnionRectWithRegion(&rect, whole, whole);
for (i = 0; i < dmxNumScreens; i++) {
WindowPtr pRoot = WindowTable[i];
WindowPtr pRoot = screenInfo.screens[i]->root;
WindowPtr pChild;
#if DMX_WINDOW_DEBUG

View File

@ -570,7 +570,7 @@ static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
int i;
#ifdef PANORAMIX
if (!noPanoramiXExtension && pWindow && pWindow->parent != WindowTable[0])
if (!noPanoramiXExtension && pWindow && pWindow->parent != screenInfo.screens[0]->root)
return;
#endif
#if DMX_WINDOW_DEBUG

View File

@ -95,7 +95,7 @@ KdOsFuncs *kdOsFuncs;
void
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{
WindowPtr pWin = WindowTable[pScreen->myNum];
WindowPtr pWin = pScreen->root;
WindowPtr pChild;
Bool WasViewable;
Bool anyMarked = FALSE;

View File

@ -1062,7 +1062,7 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
static void
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
WindowPtr pWin = WindowTable[pScreen->myNum];
WindowPtr pWin = pScreen->root;
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = FALSE;

View File

@ -159,7 +159,7 @@ xf86RandRSetMode (ScreenPtr pScreen,
int oldmmHeight = pScreen->mmHeight;
int oldVirtualX = scrp->virtualX;
int oldVirtualY = scrp->virtualY;
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
Bool ret = TRUE;
if (pRoot && scrp->vtSema)

View File

@ -1881,7 +1881,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
void
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
{
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
DrawablePtr root = &pScreen->root->drawable;
ChangeGCVal pval[2];
BoxPtr pbox = REGION_RECTS(clipboxes);
int i, nbox = REGION_NUM_RECTS(clipboxes);

View File

@ -347,7 +347,7 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
ev.state = state;
ev.timestamp = currentTime.milliseconds;
ev.root = WindowTable[pScreen->myNum]->drawable.id;
ev.root = pScreen->root->drawable.id;
ev.kind = kind;
ev.forced = forced;
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);

View File

@ -1187,7 +1187,7 @@ DRIDriverClipNotify(ScreenPtr pScreen)
if (pDRIPriv->nrWindows > 0) {
pDRIPriv->nrWalked = 0;
TraverseTree(WindowTable[pScreen->myNum], DRIDCNTreeTraversal,
TraverseTree(pScreen->root, DRIDCNTreeTraversal,
(pointer)pDRIWindows);
}

View File

@ -607,7 +607,7 @@ DRI2CanFlip(DrawablePtr pDraw)
if (pDraw->type == DRAWABLE_PIXMAP)
return TRUE;
pRoot = WindowTable[pScreen->myNum];
pRoot = pScreen->root;
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
pWin = (WindowPtr) pDraw;

View File

@ -517,7 +517,7 @@ xf86RandR12SetMode (ScreenPtr pScreen,
int oldHeight = pScreen->height;
int oldmmWidth = pScreen->mmWidth;
int oldmmHeight = pScreen->mmHeight;
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
DisplayModePtr currentMode = NULL;
Bool ret = TRUE;
PixmapPtr pspix = NULL;
@ -685,7 +685,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
Bool ret = FALSE;
int c;
@ -739,7 +739,7 @@ finish:
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
#if RANDR_12_INTERFACE
if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
if (xf86RandR12Key && pScreen->root && ret)
RRScreenSizeNotify (pScreen);
#endif
return ret;

View File

@ -76,9 +76,9 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
{
ScrnInfoPtr scrn = crtc->scrn;
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;
PicturePtr src, dst;
int n = REGION_NUM_RECTS(region);

View File

@ -47,7 +47,7 @@ XAACopyWindow(
return;
}
pwinRoot = WindowTable[pScreen->myNum];
pwinRoot = pScreen->root;
REGION_NULL(pScreen, &rgnDst);

View File

@ -54,7 +54,7 @@ XAACopyWindow8_32(
return;
}
pwinRoot = WindowTable[pScreen->myNum];
pwinRoot = pScreen->root;
if(doUnderlay)
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);

View File

@ -324,7 +324,7 @@ XAAOverCopyWindow(
RegionRec rgnDst;
BoxPtr pbox;
int i, nbox, dx, dy;
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {

View File

@ -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;

View File

@ -276,7 +276,7 @@ void QuartzUpdateScreens(void) {
sy = dixScreenOrigins[pScreen->myNum].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);

View File

@ -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);

View File

@ -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);
}
/*

View File

@ -262,7 +262,7 @@ winRestoreModeKeyStates (void)
/* Only process events if the rootwindow is mapped. The keyboard events
* 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;
/* Force to process all pending events in the mi event queue */

View File

@ -407,7 +407,7 @@ void
winMWExtWMRestackWindows (ScreenPtr pScreen)
{
winScreenPriv(pScreen);
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
WindowPtr pWin = NULL;
WindowPtr pWinPrev = NULL;
win32RootlessWindowPtr pRLWin = NULL;

View File

@ -144,7 +144,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
#endif
/* Get a pointer to the root window */
pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
pwinRoot = pWin->drawable.pScreen->root;
/* Create a region for the destination */
prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);

View File

@ -19,7 +19,6 @@ extern _X_EXPORT char *defaultFontPath;
extern _X_EXPORT int monitorResolution;
extern _X_EXPORT int defaultColorVisualClass;
extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
extern _X_EXPORT int GrabInProgress;
extern _X_EXPORT Bool noTestExtensions;

View File

@ -478,6 +478,7 @@ typedef struct _Screen {
pointer devPrivate;
short numVisuals;
VisualPtr visuals;
WindowPtr root;
ScreenSaverStuffRec screensaver;
/* Random screen procedures */

View File

@ -405,7 +405,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
}
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
miDCScreenKey);
pWin = WindowTable[pScreen->myNum];
pWin = pScreen->root;
pBuffer = MIDCBUFFER(pDev, pScreen);
#ifdef ARGB_CURSOR
@ -448,7 +448,7 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
pBuffer = MIDCBUFFER(pDev, pScreen);
pSave = pBuffer->pSave;
pWin = WindowTable[pScreen->myNum];
pWin = pScreen->root;
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
{
if (pSave)
@ -482,7 +482,7 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
pBuffer = MIDCBUFFER(pDev, pScreen);
pSave = pBuffer->pSave;
pWin = WindowTable[pScreen->myNum];
pWin = pScreen->root;
if (!pSave)
return FALSE;
@ -513,7 +513,7 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
goto failure;
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
pWin = WindowTable[pScreen->myNum];
pWin = pScreen->root;
pBuffer->pSourceGC = miDCMakeGC(pWin);
if (!pBuffer->pSourceGC)

View File

@ -426,7 +426,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
if(!pWin->parent) {
x = panoramiXdataPtr[scrnum].x;
y = panoramiXdataPtr[scrnum].y;
pWin = WindowTable[0];
pWin = screenInfo.screens[0]->root;
realWin = pWin->drawable.id;
} else if (scrnum) {
PanoramiXRes *win;

View File

@ -306,7 +306,7 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
{
if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) {
/* This could probably be more optimal */
RebuildTree(WindowTable[pWin->drawable.pScreen->myNum]->firstChild);
RebuildTree(pWin->drawable.pScreen->root->firstChild);
}
}
@ -1610,7 +1610,7 @@ miOverlayChangeBorderWidth(
void
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
{
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
MARK_UNDERLAY(pRoot);

View File

@ -447,7 +447,7 @@ RootlessRedisplay(WindowPtr pWindow)
void
RootlessRepositionWindows(ScreenPtr pScreen)
{
WindowPtr root = WindowTable[pScreen->myNum];
WindowPtr root = pScreen->root;
WindowPtr win;
if (root != NULL) {
@ -468,7 +468,7 @@ RootlessRepositionWindows(ScreenPtr pScreen)
void
RootlessRedisplayScreen(ScreenPtr pScreen)
{
WindowPtr root = WindowTable[pScreen->myNum];
WindowPtr root = pScreen->root;
if (root != NULL) {
WindowPtr win;

View File

@ -213,7 +213,7 @@ extern RegionRec rootlessHugeRoot;
// Returns TRUE if this window is a root window
#define IsRoot(pWin) \
((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum])
((pWin) == (pWin)->drawable.pScreen->root)
/*

View File

@ -493,7 +493,7 @@ static void expose_1 (WindowPtr pWin) {
void
RootlessScreenExpose (ScreenPtr pScreen)
{
expose_1 (WindowTable[pScreen->myNum]);
expose_1 (pScreen->root);
}

View File

@ -1517,7 +1517,7 @@ RootlessOrderAllWindows (void)
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
for (i = 0; i < screenInfo.numScreens; i++) {
if (screenInfo.screens[i] == NULL) continue;
pWin = WindowTable[i];
pWin = screenInfo.screens[i]->root;
if (pWin == NULL) continue;
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
@ -1533,7 +1533,7 @@ void
RootlessEnableRoot (ScreenPtr pScreen)
{
WindowPtr pRoot;
pRoot = WindowTable[pScreen->myNum];
pRoot = pScreen->root;
RootlessEnsureFrame (pRoot);
(*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
@ -1546,7 +1546,7 @@ RootlessDisableRoot (ScreenPtr pScreen)
WindowPtr pRoot;
RootlessWindowRec *winRec;
pRoot = WindowTable[pScreen->myNum];
pRoot = pScreen->root;
winRec = WINREC (pRoot);
if (NULL == winRec)
@ -1572,8 +1572,10 @@ RootlessHideAllWindows (void)
for (i = 0; i < screenInfo.numScreens; i++)
{
pScreen = screenInfo.screens[i];
pWin = WindowTable[i];
if (pScreen == NULL || pWin == NULL)
if (pScreen == NULL)
continue;
pWin = pScreen->root;
if (pWin == NULL)
continue;
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
@ -1609,8 +1611,10 @@ RootlessShowAllWindows (void)
for (i = 0; i < screenInfo.numScreens; i++)
{
pScreen = screenInfo.screens[i];
pWin = WindowTable[i];
if (pScreen == NULL || pWin == NULL)
if (pScreen == NULL)
continue;
pWin = pScreen->root;
if (pWin == NULL)
continue;
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)

View File

@ -73,7 +73,7 @@ RREditConnectionInfo (ScreenPtr pScreen)
void
RRSendConfigNotify (ScreenPtr pScreen)
{
WindowPtr pWin = WindowTable[pScreen->myNum];
WindowPtr pWin = pScreen->root;
xEvent event;
event.u.u.type = ConfigureNotify;
@ -97,7 +97,7 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
rrScrPriv (pScreen);
xRRScreenChangeNotifyEvent se;
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
WindowPtr pRoot = WindowTable[pScreen->myNum];
WindowPtr pRoot = pScreen->root;
se.type = RRScreenChangeNotify + RREventBase;
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
@ -620,7 +620,7 @@ ProcRRGetScreenInfo (ClientPtr client)
rep.setOfRotations = RR_Rotate_0;
rep.sequenceNumber = client->sequence;
rep.length = 0;
rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id;
rep.root = pWin->drawable.pScreen->root->drawable.id;
rep.timestamp = currentTime.milliseconds;
rep.configTimestamp = currentTime.milliseconds;
rep.nSizes = 0;
@ -649,7 +649,7 @@ ProcRRGetScreenInfo (ClientPtr client)
rep.setOfRotations = output->crtc->rotations;
rep.sequenceNumber = client->sequence;
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;
rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
rep.rotation = output->crtc->rotation;
@ -961,7 +961,7 @@ sendReply:
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
rep.root = pDraw->pScreen->root->drawable.id;
if (client->swapped)
{

View File

@ -216,7 +216,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
return rc;
pScreen = pWin->drawable.pScreen;
pRoot = WindowTable[pScreen->myNum];
pRoot = pScreen->root;
rep.type = X_Reply;
rep.length = 0;

View File

@ -2681,7 +2681,7 @@ PanoramiXRenderCreatePicture (ClientPtr client)
newPict->info[0].id = stuff->pid;
if (refDraw->type == XRT_WINDOW &&
stuff->drawable == WindowTable[0]->drawable.id)
stuff->drawable == screenInfo.screens[0]->root->drawable.id)
{
newPict->u.pict.root = TRUE;
}

View File

@ -690,7 +690,7 @@ ReplaceCursor (CursorPtr pCursor,
}
}
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
WindowHasNewCursor (WindowTable[0]);
WindowHasNewCursor (screenInfo.screens[0]->root);
}
static Bool

View File

@ -43,6 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "inputstr.h"
#include "opaque.h"
#include "property.h"
#include "scrnintstr.h"
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
#include "xkbgeom.h"
@ -210,7 +211,7 @@ char * pval;
ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
out,len);
}
dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
PropModeReplace, len, pval, TRUE);
free(pval);
return TRUE;