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:
parent
80b5d3a326
commit
e7fae9ecc4
|
@ -837,7 +837,7 @@ PanoramiXConsolidate(void)
|
||||||
|
|
||||||
for (i = 0; i < PanoramiXNumScreens; i++) {
|
for (i = 0; i < PanoramiXNumScreens; i++) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[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.class = InputOutput;
|
||||||
root->u.win.root = TRUE;
|
root->u.win.root = TRUE;
|
||||||
saver->info[i].id = pScreen->screensaver.wid;
|
saver->info[i].id = pScreen->screensaver.wid;
|
||||||
|
|
|
@ -129,7 +129,7 @@ int PanoramiXCreateWindow(ClientPtr client)
|
||||||
orig_visual = stuff->visual;
|
orig_visual = stuff->visual;
|
||||||
orig_x = stuff->x;
|
orig_x = stuff->x;
|
||||||
orig_y = stuff->y;
|
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);
|
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->wid = newWin->info[j].id;
|
stuff->wid = newWin->info[j].id;
|
||||||
|
@ -328,7 +328,7 @@ int PanoramiXReparentWindow(ClientPtr client)
|
||||||
|
|
||||||
x = stuff->x;
|
x = stuff->x;
|
||||||
y = stuff->y;
|
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);
|
(stuff->parent == screenInfo.screens[0]->screensaver.wid);
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
stuff->window = win->info[j].id;
|
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)))
|
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)))
|
||||||
{
|
{
|
||||||
if ((Mask)stuff->mask & CWX) {
|
if ((Mask)stuff->mask & CWX) {
|
||||||
|
@ -544,7 +544,7 @@ int PanoramiXGetGeometry(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.root = WindowTable[0]->drawable.id;
|
rep.root = screenInfo.screens[0]->root->drawable.id;
|
||||||
rep.depth = pDraw->depth;
|
rep.depth = pDraw->depth;
|
||||||
rep.width = pDraw->width;
|
rep.width = pDraw->width;
|
||||||
rep.height = pDraw->height;
|
rep.height = pDraw->height;
|
||||||
|
@ -562,7 +562,7 @@ int PanoramiXGetGeometry(ClientPtr client)
|
||||||
WindowPtr pWin = (WindowPtr)pDraw;
|
WindowPtr pWin = (WindowPtr)pDraw;
|
||||||
rep.x = pWin->origin.x - wBorderWidth (pWin);
|
rep.x = pWin->origin.x - wBorderWidth (pWin);
|
||||||
rep.y = pWin->origin.y - 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))
|
(pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.x += panoramiXdataPtr[0].x;
|
rep.x += panoramiXdataPtr[0].x;
|
||||||
|
@ -596,7 +596,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
rep.sameScreen = xTrue;
|
rep.sameScreen = xTrue;
|
||||||
rep.child = None;
|
rep.child = None;
|
||||||
|
|
||||||
if((pWin == WindowTable[0]) ||
|
if((pWin == screenInfo.screens[0]->root) ||
|
||||||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
x = stuff->srcX - panoramiXdataPtr[0].x;
|
x = stuff->srcX - panoramiXdataPtr[0].x;
|
||||||
|
@ -634,7 +634,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
}
|
}
|
||||||
rep.dstX = x - pDst->drawable.x;
|
rep.dstX = x - pDst->drawable.x;
|
||||||
rep.dstY = y - pDst->drawable.y;
|
rep.dstY = y - pDst->drawable.y;
|
||||||
if((pDst == WindowTable[0]) ||
|
if((pDst == screenInfo.screens[0]->root) ||
|
||||||
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
(pWin->drawable.id == screenInfo.screens[0]->screensaver.wid))
|
||||||
{
|
{
|
||||||
rep.dstX += panoramiXdataPtr[0].x;
|
rep.dstX += panoramiXdataPtr[0].x;
|
||||||
|
|
|
@ -503,7 +503,7 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced)
|
||||||
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
|
ev.type = ScreenSaverNotify + ScreenSaverEventBase;
|
||||||
ev.state = state;
|
ev.state = state;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.root = WindowTable[pScreen->myNum]->drawable.id;
|
ev.root = pScreen->root->drawable.id;
|
||||||
ev.window = pScreen->screensaver.wid;
|
ev.window = pScreen->screensaver.wid;
|
||||||
ev.kind = kind;
|
ev.kind = kind;
|
||||||
ev.forced = forced;
|
ev.forced = forced;
|
||||||
|
@ -580,7 +580,7 @@ CreateSaverWindow (ScreenPtr pScreen)
|
||||||
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum],
|
pWin = CreateWindow (pSaver->wid, pScreen->root,
|
||||||
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
||||||
pAttr->borderWidth, pAttr->class,
|
pAttr->borderWidth, pAttr->class,
|
||||||
pAttr->mask, (XID *)pAttr->values,
|
pAttr->mask, (XID *)pAttr->values,
|
||||||
|
@ -866,7 +866,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
return ret;
|
return ret;
|
||||||
pScreen = pDraw->pScreen;
|
pScreen = pDraw->pScreen;
|
||||||
pParent = WindowTable[pScreen->myNum];
|
pParent = pScreen->root;
|
||||||
|
|
||||||
ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess);
|
ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess);
|
||||||
if (ret != Success)
|
if (ret != Success)
|
||||||
|
|
|
@ -156,7 +156,7 @@ ProcXCloseDevice(ClientPtr client)
|
||||||
* Delete passive grabs from all windows for this device. */
|
* Delete passive grabs from all windows for this device. */
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
DeleteDeviceEvents(d, pWin, client);
|
DeleteDeviceEvents(d, pWin, client);
|
||||||
p1 = pWin->firstChild;
|
p1 = pWin->firstChild;
|
||||||
DeleteEventsFromChildren(d, p1, client);
|
DeleteEventsFromChildren(d, p1, client);
|
||||||
|
|
|
@ -926,7 +926,7 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
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);
|
GetEventFilter(device, xi), NULL);
|
||||||
free(xi);
|
free(xi);
|
||||||
}
|
}
|
||||||
|
@ -1042,7 +1042,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
|
|
||||||
/* see comment in EnqueueEvents regarding the next three lines */
|
/* see comment in EnqueueEvents regarding the next three lines */
|
||||||
if (ev->any.type == ET_Motion)
|
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.device = device;
|
||||||
eventinfo.event = ev;
|
eventinfo.event = ev;
|
||||||
|
@ -2120,7 +2120,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
|
||||||
WindowPtr pWin, p1;
|
WindowPtr pWin, p1;
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
if (!pWin)
|
if (!pWin)
|
||||||
continue;
|
continue;
|
||||||
DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
|
DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab);
|
||||||
|
|
|
@ -93,7 +93,7 @@ int ProcXIChangeCursor(ClientPtr client)
|
||||||
|
|
||||||
if (stuff->cursor == None)
|
if (stuff->cursor == None)
|
||||||
{
|
{
|
||||||
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
|
if (pWin == pWin->drawable.pScreen->root)
|
||||||
pCursor = rootCursor;
|
pCursor = rootCursor;
|
||||||
else
|
else
|
||||||
pCursor = (CursorPtr)None;
|
pCursor = (CursorPtr)None;
|
||||||
|
|
|
@ -141,7 +141,7 @@ compScreenUpdate (ScreenPtr pScreen)
|
||||||
compCheckTree (pScreen);
|
compCheckTree (pScreen);
|
||||||
if (cs->damaged)
|
if (cs->damaged)
|
||||||
{
|
{
|
||||||
compWindowUpdate (WindowTable[pScreen->myNum]);
|
compWindowUpdate (pScreen->root);
|
||||||
cs->damaged = FALSE;
|
cs->damaged = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ Bool
|
||||||
compCreateOverlayWindow (ScreenPtr pScreen)
|
compCreateOverlayWindow (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
CompScreenPtr cs = GetCompScreen(pScreen);
|
CompScreenPtr cs = GetCompScreen(pScreen);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
|
XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
|
||||||
int result;
|
int result;
|
||||||
|
|
|
@ -360,9 +360,9 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
/* Sprites appear on first root window, so we can hardcode it */
|
/* Sprites appear on first root window, so we can hardcode it */
|
||||||
if (dev->spriteInfo->spriteOwner)
|
if (dev->spriteInfo->spriteOwner)
|
||||||
{
|
{
|
||||||
InitializeSprite(dev, WindowTable[0]);
|
InitializeSprite(dev, screenInfo.screens[0]->root);
|
||||||
/* mode doesn't matter */
|
/* mode doesn't matter */
|
||||||
EnterWindow(dev, WindowTable[0], NotifyAncestor);
|
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
|
||||||
}
|
}
|
||||||
else if ((other = NextFreePointerDevice()) == NULL)
|
else if ((other = NextFreePointerDevice()) == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2435,7 +2435,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
|
||||||
if (dev->spriteInfo->sprite)
|
if (dev->spriteInfo->sprite)
|
||||||
currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
|
currentRoot = dev->spriteInfo->sprite->spriteTrace[0];
|
||||||
else /* new device auto-set to floating */
|
else /* new device auto-set to floating */
|
||||||
currentRoot = WindowTable[0];
|
currentRoot = screenInfo.screens[0]->root;
|
||||||
|
|
||||||
/* we need to init a fake sprite */
|
/* we need to init a fake sprite */
|
||||||
screen = currentRoot->drawable.pScreen;
|
screen = currentRoot->drawable.pScreen;
|
||||||
|
|
|
@ -562,7 +562,7 @@ CreateConnectionBlock(void)
|
||||||
VisualPtr pVisual;
|
VisualPtr pVisual;
|
||||||
|
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
root.windowId = WindowTable[i]->drawable.id;
|
root.windowId = pScreen->root->drawable.id;
|
||||||
root.defaultColormap = pScreen->defColormap;
|
root.defaultColormap = pScreen->defColormap;
|
||||||
root.whitePixel = pScreen->whitePixel;
|
root.whitePixel = pScreen->whitePixel;
|
||||||
root.blackPixel = pScreen->blackPixel;
|
root.blackPixel = pScreen->blackPixel;
|
||||||
|
@ -912,7 +912,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep)
|
||||||
rep->type = X_Reply;
|
rep->type = X_Reply;
|
||||||
rep->length = 0;
|
rep->length = 0;
|
||||||
rep->sequenceNumber = client->sequence;
|
rep->sequenceNumber = client->sequence;
|
||||||
rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
|
rep->root = pDraw->pScreen->root->drawable.id;
|
||||||
rep->depth = pDraw->depth;
|
rep->depth = pDraw->depth;
|
||||||
rep->width = pDraw->width;
|
rep->width = pDraw->width;
|
||||||
rep->height = pDraw->height;
|
rep->height = pDraw->height;
|
||||||
|
@ -972,7 +972,7 @@ ProcQueryTree(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
memset(&reply, 0, sizeof(xQueryTreeReply));
|
memset(&reply, 0, sizeof(xQueryTreeReply));
|
||||||
reply.type = X_Reply;
|
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;
|
reply.sequenceNumber = client->sequence;
|
||||||
if (pWin->parent)
|
if (pWin->parent)
|
||||||
reply.parent = pWin->parent->drawable.id;
|
reply.parent = pWin->parent->drawable.id;
|
||||||
|
@ -2055,7 +2055,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum];
|
pBoundingDraw = (DrawablePtr)pDraw->pScreen->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
xgi.visual = wVisual (pWin);
|
xgi.visual = wVisual (pWin);
|
||||||
|
@ -3666,9 +3666,9 @@ SendConnSetup(ClientPtr client, char *reason)
|
||||||
{
|
{
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
xDepth *pDepth;
|
xDepth *pDepth;
|
||||||
|
WindowPtr pRoot = screenInfo.screens[i]->root;
|
||||||
|
|
||||||
root->currentInputMask = WindowTable[i]->eventMask |
|
root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot);
|
||||||
wOtherEventMasks (WindowTable[i]);
|
|
||||||
pDepth = (xDepth *)(root + 1);
|
pDepth = (xDepth *)(root + 1);
|
||||||
for (j = 0; j < root->nDepths; j++)
|
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
|
any of the strings pointed to by argv. They may be passed to
|
||||||
multiple screens.
|
multiple screens.
|
||||||
*/
|
*/
|
||||||
WindowTable[i] = NullWindow;
|
|
||||||
screenInfo.screens[i] = pScreen;
|
screenInfo.screens[i] = pScreen;
|
||||||
screenInfo.numScreens++;
|
screenInfo.numScreens++;
|
||||||
if (!(*pfnInit)(i, pScreen, argc, argv))
|
if (!(*pfnInit)(i, pScreen, argc, argv))
|
||||||
|
|
|
@ -1077,7 +1077,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
|
if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
||||||
|
@ -1138,7 +1138,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasFocus(root) && !FirstFocusChild(root))
|
if (!HasFocus(root) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
|
CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root);
|
||||||
|
@ -1169,7 +1169,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev,
|
||||||
|
|
||||||
for (i = 0; i < nscreens; i++)
|
for (i = 0; i < nscreens; i++)
|
||||||
{
|
{
|
||||||
root = WindowTable[i];
|
root = screenInfo.screens[i]->root;
|
||||||
if (!HasFocus(root) && !FirstFocusChild(root))
|
if (!HasFocus(root) && !FirstFocusChild(root))
|
||||||
{
|
{
|
||||||
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
/* If pointer was on PointerRootWin and changes to NoneWin, and
|
||||||
|
@ -1279,7 +1279,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
NotifyPointer);
|
NotifyPointer);
|
||||||
/* Notify all the roots */
|
/* Notify all the roots */
|
||||||
for (i = 0; i < nscreens; i++)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -1293,7 +1293,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
}
|
}
|
||||||
/* Notify all the roots */
|
/* Notify all the roots */
|
||||||
for (i = 0; i < nscreens; i++)
|
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)
|
if (to == PointerRootWin)
|
||||||
DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer);
|
DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer);
|
||||||
}
|
}
|
||||||
|
@ -1305,7 +1305,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
|
||||||
DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode,
|
DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode,
|
||||||
NotifyPointer);
|
NotifyPointer);
|
||||||
for (i = 0; i < nscreens; i++)
|
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)
|
if (to->parent != NullWindow)
|
||||||
DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual);
|
DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual);
|
||||||
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to);
|
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to);
|
||||||
|
|
34
dix/events.c
34
dix/events.c
|
@ -556,9 +556,10 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
{
|
{
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
if(pWin == WindowTable[0]) {
|
if(pWin == screenInfo.screens[0]->root) {
|
||||||
memcpy(pSprite->windows, WindowTable,
|
int i;
|
||||||
PanoramiXNumScreens*sizeof(WindowPtr));
|
for (i = 0; i < PanoramiXNumScreens; i++)
|
||||||
|
pSprite->windows[i] = screenInfo.screens[i]->root;
|
||||||
} else {
|
} else {
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
@ -619,7 +620,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev,
|
||||||
pSprite->hotShape = NullRegion;
|
pSprite->hotShape = NullRegion;
|
||||||
|
|
||||||
pSprite->confined = FALSE;
|
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);
|
CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL);
|
||||||
}
|
}
|
||||||
|
@ -875,7 +876,7 @@ CheckVirtualMotion(
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
|
if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */
|
||||||
#endif
|
#endif
|
||||||
RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum];
|
RootWindow(pDev) = pSprite->hot.pScreen->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1123,7 +1124,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
|
||||||
* updated yet.
|
* updated yet.
|
||||||
*/
|
*/
|
||||||
if (ev->any.type == ET_Motion)
|
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.event = ev;
|
||||||
eventinfo.device = device;
|
eventinfo.device = device;
|
||||||
|
@ -1339,7 +1340,7 @@ playmore:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ConfineCursorToWindow(dev,
|
ConfineCursorToWindow(dev,
|
||||||
WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum],
|
dev->spriteInfo->sprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
PostNewCursor(dev);
|
PostNewCursor(dev);
|
||||||
}
|
}
|
||||||
|
@ -1369,7 +1370,7 @@ ScreenRestructured (ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ConfineCursorToWindow(pDev,
|
ConfineCursorToWindow(pDev,
|
||||||
WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum],
|
pDev->spriteInfo->sprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2766,7 +2767,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
|
||||||
if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
|
if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen)
|
||||||
{
|
{
|
||||||
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
|
#ifdef PANORAMIX
|
||||||
/* This was added to support reconfiguration under Xdmx. The problem is
|
/* 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
|
* other than 0,0, the information in the private sprite structure must
|
||||||
* be updated accordingly, or XYToWindow (and other routines) will not
|
* be updated accordingly, or XYToWindow (and other routines) will not
|
||||||
* compute correctly. */
|
* compute correctly. */
|
||||||
|
@ -2892,7 +2893,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
||||||
} else
|
} else
|
||||||
ConfineCursorToWindow(
|
ConfineCursorToWindow(
|
||||||
pDev,
|
pDev,
|
||||||
WindowTable[pSprite->hotPhys.pScreen->myNum],
|
pSprite->hotPhys.pScreen->root,
|
||||||
TRUE, FALSE);
|
TRUE, FALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3051,7 +3052,7 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
|
|
||||||
pSprite = pDev->spriteInfo->sprite;
|
pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
win = WindowTable[pScreen->myNum];
|
win = pScreen->root;
|
||||||
|
|
||||||
pSprite->hotPhys.pScreen = pScreen;
|
pSprite->hotPhys.pScreen = pScreen;
|
||||||
pSprite->hot = pSprite->hotPhys;
|
pSprite->hot = pSprite->hotPhys;
|
||||||
|
@ -3124,7 +3125,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
|
||||||
XineramaConfineCursorToWindow(pDev,
|
XineramaConfineCursorToWindow(pDev,
|
||||||
pSprite->confineWin, TRUE);
|
pSprite->confineWin, TRUE);
|
||||||
else
|
else
|
||||||
XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE);
|
XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE);
|
||||||
/* if the pointer wasn't confined, the DDX won't get
|
/* if the pointer wasn't confined, the DDX won't get
|
||||||
told of the pointer warp so we reposition it here */
|
told of the pointer warp so we reposition it here */
|
||||||
if(!syncEvents.playingEvents)
|
if(!syncEvents.playingEvents)
|
||||||
|
@ -3139,8 +3140,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y)
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (newScreen != pSprite->hotPhys.pScreen)
|
if (newScreen != pSprite->hotPhys.pScreen)
|
||||||
ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum],
|
ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE);
|
||||||
TRUE, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
|
@ -3215,7 +3215,7 @@ XineramaWarpPointer(ClientPtr client)
|
||||||
|
|
||||||
winX = source->drawable.x;
|
winX = source->drawable.x;
|
||||||
winY = source->drawable.y;
|
winY = source->drawable.y;
|
||||||
if(source == WindowTable[0]) {
|
if(source == screenInfo.screens[0]->root) {
|
||||||
winX -= panoramiXdataPtr[0].x;
|
winX -= panoramiXdataPtr[0].x;
|
||||||
winY -= panoramiXdataPtr[0].y;
|
winY -= panoramiXdataPtr[0].y;
|
||||||
}
|
}
|
||||||
|
@ -3231,7 +3231,7 @@ XineramaWarpPointer(ClientPtr client)
|
||||||
if (dest) {
|
if (dest) {
|
||||||
x = dest->drawable.x;
|
x = dest->drawable.x;
|
||||||
y = dest->drawable.y;
|
y = dest->drawable.y;
|
||||||
if(dest == WindowTable[0]) {
|
if(dest == screenInfo.screens[0]->root) {
|
||||||
x -= panoramiXdataPtr[0].x;
|
x -= panoramiXdataPtr[0].x;
|
||||||
y -= panoramiXdataPtr[0].y;
|
y -= panoramiXdataPtr[0].y;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,8 +83,6 @@ ClientPtr serverClient;
|
||||||
int currentMaxClients; /* current size of clients array */
|
int currentMaxClients; /* current size of clients array */
|
||||||
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
||||||
|
|
||||||
WindowPtr WindowTable[MAXSCREENS];
|
|
||||||
|
|
||||||
unsigned long globalSerialNumber = 0;
|
unsigned long globalSerialNumber = 0;
|
||||||
unsigned long serverGeneration = 0;
|
unsigned long serverGeneration = 0;
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
InitRootWindow(WindowTable[i]);
|
InitRootWindow(screenInfo.screens[i]->root);
|
||||||
|
|
||||||
InitCoreDevices();
|
InitCoreDevices();
|
||||||
InitInput(argc, argv);
|
InitInput(argc, argv);
|
||||||
|
@ -303,7 +303,8 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
|
|
||||||
CloseInput();
|
CloseInput();
|
||||||
|
|
||||||
memset(WindowTable, 0, sizeof(WindowTable));
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
|
screenInfo.screens[i]->root = NullWindow;
|
||||||
CloseDownDevices();
|
CloseDownDevices();
|
||||||
CloseDownEvents();
|
CloseDownEvents();
|
||||||
|
|
||||||
|
|
21
dix/window.c
21
dix/window.c
|
@ -210,7 +210,7 @@ PrintWindowTree(void)
|
||||||
for (i=0; i<screenInfo.numScreens; i++)
|
for (i=0; i<screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
ErrorF("[dix] WINDOW %d\n", i);
|
ErrorF("[dix] WINDOW %d\n", i);
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
miPrintRegion(&pWin->clipList);
|
miPrintRegion(&pWin->clipList);
|
||||||
p1 = pWin->firstChild;
|
p1 = pWin->firstChild;
|
||||||
PrintChildren(p1, 4);
|
PrintChildren(p1, 4);
|
||||||
|
@ -256,7 +256,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data)
|
||||||
int
|
int
|
||||||
WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
|
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 */
|
/* hack for forcing backing store on all windows */
|
||||||
|
@ -366,7 +366,7 @@ CreateRootWindow(ScreenPtr pScreen)
|
||||||
pScreen->screensaver.ExternalScreenSaver = NULL;
|
pScreen->screensaver.ExternalScreenSaver = NULL;
|
||||||
screenIsSaved = SCREEN_SAVER_OFF;
|
screenIsSaved = SCREEN_SAVER_OFF;
|
||||||
|
|
||||||
WindowTable[pScreen->myNum] = pWin;
|
pScreen->root = pWin;
|
||||||
|
|
||||||
pWin->drawable.pScreen = pScreen;
|
pWin->drawable.pScreen = pScreen;
|
||||||
pWin->drawable.type = DRAWABLE_WINDOW;
|
pWin->drawable.type = DRAWABLE_WINDOW;
|
||||||
|
@ -1327,7 +1327,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||||
*/
|
*/
|
||||||
if ( cursorID == None)
|
if ( cursorID == None)
|
||||||
{
|
{
|
||||||
if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
|
if (pWin == pWin->drawable.pScreen->root)
|
||||||
pCursor = rootCursor;
|
pCursor = rootCursor;
|
||||||
else
|
else
|
||||||
pCursor = (CursorPtr) None;
|
pCursor = (CursorPtr) None;
|
||||||
|
@ -2964,7 +2964,7 @@ HandleSaveSet(ClientPtr client)
|
||||||
pWin = SaveSetWindow(client->saveSet[j]);
|
pWin = SaveSetWindow(client->saveSet[j]);
|
||||||
#ifdef XFIXES
|
#ifdef XFIXES
|
||||||
if (SaveSetToRoot(client->saveSet[j]))
|
if (SaveSetToRoot(client->saveSet[j]))
|
||||||
pParent = WindowTable[pWin->drawable.pScreen->myNum];
|
pParent = pWin->drawable.pScreen->root;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -3250,7 +3250,6 @@ SaveScreens(int on, int mode)
|
||||||
static Bool
|
static Bool
|
||||||
TileScreenSaver(ScreenPtr pScreen, int kind)
|
TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
{
|
{
|
||||||
int i = pScreen->myNum;
|
|
||||||
int j;
|
int j;
|
||||||
int result;
|
int result;
|
||||||
XID attributes[3];
|
XID attributes[3];
|
||||||
|
@ -3266,9 +3265,9 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
attri = 0;
|
attri = 0;
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case SCREEN_IS_TILED:
|
case SCREEN_IS_TILED:
|
||||||
switch (WindowTable[i]->backgroundState) {
|
switch (pScreen->root->backgroundState) {
|
||||||
case BackgroundPixel:
|
case BackgroundPixel:
|
||||||
attributes[attri++] = WindowTable[i]->background.pixel;
|
attributes[attri++] = pScreen->root->background.pixel;
|
||||||
mask |= CWBackPixel;
|
mask |= CWBackPixel;
|
||||||
break;
|
break;
|
||||||
case BackgroundPixmap:
|
case BackgroundPixmap:
|
||||||
|
@ -3280,7 +3279,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCREEN_IS_BLACK:
|
case SCREEN_IS_BLACK:
|
||||||
attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel;
|
attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel;
|
||||||
mask |= CWBackPixel;
|
mask |= CWBackPixel;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3329,12 +3328,12 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
|
|
||||||
pWin = pScreen->screensaver.pWindow =
|
pWin = pScreen->screensaver.pWindow =
|
||||||
CreateWindow(pScreen->screensaver.wid,
|
CreateWindow(pScreen->screensaver.wid,
|
||||||
WindowTable[i],
|
pScreen->root,
|
||||||
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
||||||
(unsigned short)pScreen->width + RANDOM_WIDTH,
|
(unsigned short)pScreen->width + RANDOM_WIDTH,
|
||||||
(unsigned short)pScreen->height + RANDOM_WIDTH,
|
(unsigned short)pScreen->height + RANDOM_WIDTH,
|
||||||
0, InputOutput, mask, attributes, 0, serverClient,
|
0, InputOutput, mask, attributes, 0, serverClient,
|
||||||
wVisual (WindowTable[i]), &result);
|
wVisual (pScreen->root), &result);
|
||||||
|
|
||||||
if (cursor)
|
if (cursor)
|
||||||
FreeResource (cursorID, RT_NONE);
|
FreeResource (cursorID, RT_NONE);
|
||||||
|
|
2
fb/fb.h
2
fb/fb.h
|
@ -740,7 +740,7 @@ typedef struct {
|
||||||
|
|
||||||
#define fbWindowEnabled(pWin) \
|
#define fbWindowEnabled(pWin) \
|
||||||
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
|
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
|
||||||
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
|
&(pWin)->drawable.pScreen->root->borderClip)
|
||||||
|
|
||||||
#define fbDrawableEnabled(pDrawable) \
|
#define fbDrawableEnabled(pDrawable) \
|
||||||
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
||||||
|
|
|
@ -297,7 +297,7 @@ void dmxFlushPendingSyncs(void)
|
||||||
void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
|
void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool anyMarked = FALSE;
|
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)
|
static void dmxConfigureRootWindow(int idx, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
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
|
/* NOTE: Either this function or the ones that it calls must handle
|
||||||
* the case where w == 0 || h == 0. Currently, the functions that
|
* 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];
|
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
||||||
ScreenPtr pScreen = screenInfo.screens[idx];
|
ScreenPtr pScreen = screenInfo.screens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
int xoff;
|
int xoff;
|
||||||
int yoff;
|
int yoff;
|
||||||
|
@ -458,7 +458,7 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y)
|
||||||
XineramaReinitData(pScreen);
|
XineramaReinitData(pScreen);
|
||||||
|
|
||||||
/* Adjust each of the root window's children */
|
/* 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;
|
pChild = pRoot->firstChild;
|
||||||
while (pChild) {
|
while (pChild) {
|
||||||
/* Adjust child window's position */
|
/* Adjust child window's position */
|
||||||
|
@ -634,7 +634,7 @@ int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
WindowPtr pChild = WindowTable[i]->firstChild;
|
WindowPtr pChild = pScreen->root->firstChild;
|
||||||
while (pChild) {
|
while (pChild) {
|
||||||
/* Adjust child window's position */
|
/* Adjust child window's position */
|
||||||
pScreen->MoveWindow(pChild,
|
pScreen->MoveWindow(pChild,
|
||||||
|
@ -914,7 +914,7 @@ static void dmxBECreateResources(pointer value, XID id, RESTYPE type,
|
||||||
static void dmxBECreateWindowTree(int idx)
|
static void dmxBECreateWindowTree(int idx)
|
||||||
{
|
{
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
DMXScreenInfo *dmxScreen = &dmxScreens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = screenInfo.screens[idx]->root;
|
||||||
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
|
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
|
@ -982,7 +982,7 @@ static void dmxBECreateWindowTree(int idx)
|
||||||
static void dmxForceExposures(int idx)
|
static void dmxForceExposures(int idx)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = screenInfo.screens[idx];
|
ScreenPtr pScreen = screenInfo.screens[idx];
|
||||||
WindowPtr pRoot = WindowTable[idx];
|
WindowPtr pRoot = pScreen->root;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
|
@ -1510,7 +1510,7 @@ static void dmxBEDestroyScratchGCs(int scrnNum)
|
||||||
* destroy a window as well as all of it's children. */
|
* destroy a window as well as all of it's children. */
|
||||||
static void dmxBEDestroyWindowTree(int idx)
|
static void dmxBEDestroyWindowTree(int idx)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[idx];
|
WindowPtr pWin = screenInfo.screens[idx]->root;
|
||||||
WindowPtr pChild = pWin;
|
WindowPtr pChild = pWin;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -204,7 +204,7 @@ static void dmxConsoleDrawWindows(pointer private)
|
||||||
XUnionRectWithRegion(&rect, whole, whole);
|
XUnionRectWithRegion(&rect, whole, whole);
|
||||||
|
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
WindowPtr pRoot = WindowTable[i];
|
WindowPtr pRoot = screenInfo.screens[i]->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
#if DMX_WINDOW_DEBUG
|
#if DMX_WINDOW_DEBUG
|
||||||
|
|
|
@ -570,7 +570,7 @@ static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
if (!noPanoramiXExtension && pWindow && pWindow->parent != WindowTable[0])
|
if (!noPanoramiXExtension && pWindow && pWindow->parent != screenInfo.screens[0]->root)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
#if DMX_WINDOW_DEBUG
|
#if DMX_WINDOW_DEBUG
|
||||||
|
|
|
@ -95,7 +95,7 @@ KdOsFuncs *kdOsFuncs;
|
||||||
void
|
void
|
||||||
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable;
|
Bool WasViewable;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
|
|
|
@ -1062,7 +1062,7 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
|
||||||
static void
|
static void
|
||||||
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
|
|
|
@ -159,7 +159,7 @@ xf86RandRSetMode (ScreenPtr pScreen,
|
||||||
int oldmmHeight = pScreen->mmHeight;
|
int oldmmHeight = pScreen->mmHeight;
|
||||||
int oldVirtualX = scrp->virtualX;
|
int oldVirtualX = scrp->virtualX;
|
||||||
int oldVirtualY = scrp->virtualY;
|
int oldVirtualY = scrp->virtualY;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
|
|
||||||
if (pRoot && scrp->vtSema)
|
if (pRoot && scrp->vtSema)
|
||||||
|
|
|
@ -1881,7 +1881,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
|
||||||
void
|
void
|
||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
||||||
{
|
{
|
||||||
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
|
DrawablePtr root = &pScreen->root->drawable;
|
||||||
ChangeGCVal pval[2];
|
ChangeGCVal pval[2];
|
||||||
BoxPtr pbox = REGION_RECTS(clipboxes);
|
BoxPtr pbox = REGION_RECTS(clipboxes);
|
||||||
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
||||||
|
|
|
@ -347,7 +347,7 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
|
||||||
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
|
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
|
||||||
ev.state = state;
|
ev.state = state;
|
||||||
ev.timestamp = currentTime.milliseconds;
|
ev.timestamp = currentTime.milliseconds;
|
||||||
ev.root = WindowTable[pScreen->myNum]->drawable.id;
|
ev.root = pScreen->root->drawable.id;
|
||||||
ev.kind = kind;
|
ev.kind = kind;
|
||||||
ev.forced = forced;
|
ev.forced = forced;
|
||||||
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
WriteEventsToClient (pEv->client, 1, (xEvent *) &ev);
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ DRIDriverClipNotify(ScreenPtr pScreen)
|
||||||
|
|
||||||
if (pDRIPriv->nrWindows > 0) {
|
if (pDRIPriv->nrWindows > 0) {
|
||||||
pDRIPriv->nrWalked = 0;
|
pDRIPriv->nrWalked = 0;
|
||||||
TraverseTree(WindowTable[pScreen->myNum], DRIDCNTreeTraversal,
|
TraverseTree(pScreen->root, DRIDCNTreeTraversal,
|
||||||
(pointer)pDRIWindows);
|
(pointer)pDRIWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -607,7 +607,7 @@ DRI2CanFlip(DrawablePtr pDraw)
|
||||||
if (pDraw->type == DRAWABLE_PIXMAP)
|
if (pDraw->type == DRAWABLE_PIXMAP)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
|
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
|
||||||
|
|
||||||
pWin = (WindowPtr) pDraw;
|
pWin = (WindowPtr) pDraw;
|
||||||
|
|
|
@ -517,7 +517,7 @@ xf86RandR12SetMode (ScreenPtr pScreen,
|
||||||
int oldHeight = pScreen->height;
|
int oldHeight = pScreen->height;
|
||||||
int oldmmWidth = pScreen->mmWidth;
|
int oldmmWidth = pScreen->mmWidth;
|
||||||
int oldmmHeight = pScreen->mmHeight;
|
int oldmmHeight = pScreen->mmHeight;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
DisplayModePtr currentMode = NULL;
|
DisplayModePtr currentMode = NULL;
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
PixmapPtr pspix = NULL;
|
PixmapPtr pspix = NULL;
|
||||||
|
@ -685,7 +685,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
||||||
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
||||||
Bool ret = FALSE;
|
Bool ret = FALSE;
|
||||||
int c;
|
int c;
|
||||||
|
@ -739,7 +739,7 @@ finish:
|
||||||
if (pRoot && pScrn->vtSema)
|
if (pRoot && pScrn->vtSema)
|
||||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
||||||
#if RANDR_12_INTERFACE
|
#if RANDR_12_INTERFACE
|
||||||
if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret)
|
if (xf86RandR12Key && pScreen->root && ret)
|
||||||
RRScreenSizeNotify (pScreen);
|
RRScreenSizeNotify (pScreen);
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -76,9 +76,9 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr scrn = crtc->scrn;
|
ScrnInfoPtr scrn = crtc->scrn;
|
||||||
ScreenPtr screen = scrn->pScreen;
|
ScreenPtr screen = scrn->pScreen;
|
||||||
WindowPtr root = WindowTable[screen->myNum];
|
WindowPtr root = screen->root;
|
||||||
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
|
PixmapPtr dst_pixmap = crtc->rotatedPixmap;
|
||||||
PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]);
|
PictFormatPtr format = compWindowFormat (screen->root);
|
||||||
int error;
|
int error;
|
||||||
PicturePtr src, dst;
|
PicturePtr src, dst;
|
||||||
int n = REGION_NUM_RECTS(region);
|
int n = REGION_NUM_RECTS(region);
|
||||||
|
|
|
@ -47,7 +47,7 @@ XAACopyWindow(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pwinRoot = WindowTable[pScreen->myNum];
|
pwinRoot = pScreen->root;
|
||||||
|
|
||||||
REGION_NULL(pScreen, &rgnDst);
|
REGION_NULL(pScreen, &rgnDst);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ XAACopyWindow8_32(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pwinRoot = WindowTable[pScreen->myNum];
|
pwinRoot = pScreen->root;
|
||||||
|
|
||||||
if(doUnderlay)
|
if(doUnderlay)
|
||||||
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
|
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
|
||||||
|
|
|
@ -324,7 +324,7 @@ XAAOverCopyWindow(
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int i, nbox, dx, dy;
|
int i, nbox, dx, dy;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
|
|
||||||
|
|
||||||
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {
|
if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) {
|
||||||
|
|
|
@ -793,7 +793,7 @@ void AbortDDX( void )
|
||||||
void
|
void
|
||||||
xf86SetRootClip (ScreenPtr pScreen, int enable)
|
xf86SetRootClip (ScreenPtr pScreen, int enable)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = TRUE;
|
Bool anyMarked = TRUE;
|
||||||
|
|
|
@ -276,7 +276,7 @@ void QuartzUpdateScreens(void) {
|
||||||
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
|
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
|
||||||
|
|
||||||
/* Adjust the root window. */
|
/* Adjust the root window. */
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
AppleWMSetScreenOrigin(pRoot);
|
AppleWMSetScreenOrigin(pRoot);
|
||||||
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
||||||
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||||
|
|
|
@ -576,7 +576,7 @@ xprHideWindows(Bool hide)
|
||||||
|
|
||||||
for (screen = 0; screen < screenInfo.numScreens; screen++) {
|
for (screen = 0; screen < screenInfo.numScreens; screen++) {
|
||||||
RootlessFrameID prevWid = NULL;
|
RootlessFrameID prevWid = NULL;
|
||||||
pRoot = WindowTable[screenInfo.screens[screen]->myNum];
|
pRoot = screenInfo.screens[screen]->root;
|
||||||
|
|
||||||
for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
|
for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
|
||||||
RootlessWindowRec *winRec = WINREC(pWin);
|
RootlessWindowRec *winRec = WINREC(pWin);
|
||||||
|
|
|
@ -397,7 +397,7 @@ xprUpdateScreen(ScreenPtr pScreen)
|
||||||
rootlessGlobalOffsetX = darwinMainScreenX;
|
rootlessGlobalOffsetX = darwinMainScreenX;
|
||||||
rootlessGlobalOffsetY = darwinMainScreenY;
|
rootlessGlobalOffsetY = darwinMainScreenY;
|
||||||
|
|
||||||
AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]);
|
AppleWMSetScreenOrigin(pScreen->root);
|
||||||
|
|
||||||
RootlessRepositionWindows(pScreen);
|
RootlessRepositionWindows(pScreen);
|
||||||
RootlessUpdateScreenPixmap(pScreen);
|
RootlessUpdateScreenPixmap(pScreen);
|
||||||
|
@ -416,7 +416,7 @@ xprInitInput(int argc, char **argv)
|
||||||
rootlessGlobalOffsetY = darwinMainScreenY;
|
rootlessGlobalOffsetY = darwinMainScreenY;
|
||||||
|
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
AppleWMSetScreenOrigin(WindowTable[i]);
|
AppleWMSetScreenOrigin(screenInfo.screens[i]->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -262,7 +262,7 @@ winRestoreModeKeyStates (void)
|
||||||
|
|
||||||
/* Only process events if the rootwindow is mapped. The keyboard events
|
/* Only process events if the rootwindow is mapped. The keyboard events
|
||||||
* will cause segfaults otherwise */
|
* 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;
|
processEvents = FALSE;
|
||||||
|
|
||||||
/* Force to process all pending events in the mi event queue */
|
/* Force to process all pending events in the mi event queue */
|
||||||
|
|
|
@ -407,7 +407,7 @@ void
|
||||||
winMWExtWMRestackWindows (ScreenPtr pScreen)
|
winMWExtWMRestackWindows (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
winScreenPriv(pScreen);
|
winScreenPriv(pScreen);
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
WindowPtr pWin = NULL;
|
WindowPtr pWin = NULL;
|
||||||
WindowPtr pWinPrev = NULL;
|
WindowPtr pWinPrev = NULL;
|
||||||
win32RootlessWindowPtr pRLWin = NULL;
|
win32RootlessWindowPtr pRLWin = NULL;
|
||||||
|
|
|
@ -144,7 +144,7 @@ winCopyWindowNativeGDI (WindowPtr pWin,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get a pointer to the root window */
|
/* Get a pointer to the root window */
|
||||||
pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
|
pwinRoot = pWin->drawable.pScreen->root;
|
||||||
|
|
||||||
/* Create a region for the destination */
|
/* Create a region for the destination */
|
||||||
prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
|
prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
|
||||||
|
|
|
@ -19,7 +19,6 @@ extern _X_EXPORT char *defaultFontPath;
|
||||||
extern _X_EXPORT int monitorResolution;
|
extern _X_EXPORT int monitorResolution;
|
||||||
extern _X_EXPORT int defaultColorVisualClass;
|
extern _X_EXPORT int defaultColorVisualClass;
|
||||||
|
|
||||||
extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
|
|
||||||
extern _X_EXPORT int GrabInProgress;
|
extern _X_EXPORT int GrabInProgress;
|
||||||
extern _X_EXPORT Bool noTestExtensions;
|
extern _X_EXPORT Bool noTestExtensions;
|
||||||
|
|
||||||
|
|
|
@ -478,6 +478,7 @@ typedef struct _Screen {
|
||||||
pointer devPrivate;
|
pointer devPrivate;
|
||||||
short numVisuals;
|
short numVisuals;
|
||||||
VisualPtr visuals;
|
VisualPtr visuals;
|
||||||
|
WindowPtr root;
|
||||||
ScreenSaverStuffRec screensaver;
|
ScreenSaverStuffRec screensaver;
|
||||||
|
|
||||||
/* Random screen procedures */
|
/* Random screen procedures */
|
||||||
|
|
|
@ -405,7 +405,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
||||||
}
|
}
|
||||||
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
|
||||||
miDCScreenKey);
|
miDCScreenKey);
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
|
|
||||||
#ifdef ARGB_CURSOR
|
#ifdef ARGB_CURSOR
|
||||||
|
@ -448,7 +448,7 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
|
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
|
if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h)
|
||||||
{
|
{
|
||||||
if (pSave)
|
if (pSave)
|
||||||
|
@ -482,7 +482,7 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pBuffer = MIDCBUFFER(pDev, pScreen);
|
pBuffer = MIDCBUFFER(pDev, pScreen);
|
||||||
pSave = pBuffer->pSave;
|
pSave = pBuffer->pSave;
|
||||||
|
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
if (!pSave)
|
if (!pSave)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
|
dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer);
|
||||||
pWin = WindowTable[pScreen->myNum];
|
pWin = pScreen->root;
|
||||||
|
|
||||||
pBuffer->pSourceGC = miDCMakeGC(pWin);
|
pBuffer->pSourceGC = miDCMakeGC(pWin);
|
||||||
if (!pBuffer->pSourceGC)
|
if (!pBuffer->pSourceGC)
|
||||||
|
|
|
@ -426,7 +426,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
|
||||||
if(!pWin->parent) {
|
if(!pWin->parent) {
|
||||||
x = panoramiXdataPtr[scrnum].x;
|
x = panoramiXdataPtr[scrnum].x;
|
||||||
y = panoramiXdataPtr[scrnum].y;
|
y = panoramiXdataPtr[scrnum].y;
|
||||||
pWin = WindowTable[0];
|
pWin = screenInfo.screens[0]->root;
|
||||||
realWin = pWin->drawable.id;
|
realWin = pWin->drawable.id;
|
||||||
} else if (scrnum) {
|
} else if (scrnum) {
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
|
|
|
@ -306,7 +306,7 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
|
||||||
{
|
{
|
||||||
if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) {
|
if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) {
|
||||||
/* This could probably be more optimal */
|
/* 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
|
void
|
||||||
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
|
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
|
||||||
{
|
{
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
|
||||||
|
|
||||||
MARK_UNDERLAY(pRoot);
|
MARK_UNDERLAY(pRoot);
|
||||||
|
|
|
@ -447,7 +447,7 @@ RootlessRedisplay(WindowPtr pWindow)
|
||||||
void
|
void
|
||||||
RootlessRepositionWindows(ScreenPtr pScreen)
|
RootlessRepositionWindows(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr root = WindowTable[pScreen->myNum];
|
WindowPtr root = pScreen->root;
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
|
|
||||||
if (root != NULL) {
|
if (root != NULL) {
|
||||||
|
@ -468,7 +468,7 @@ RootlessRepositionWindows(ScreenPtr pScreen)
|
||||||
void
|
void
|
||||||
RootlessRedisplayScreen(ScreenPtr pScreen)
|
RootlessRedisplayScreen(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr root = WindowTable[pScreen->myNum];
|
WindowPtr root = pScreen->root;
|
||||||
|
|
||||||
if (root != NULL) {
|
if (root != NULL) {
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
|
|
|
@ -213,7 +213,7 @@ extern RegionRec rootlessHugeRoot;
|
||||||
|
|
||||||
// Returns TRUE if this window is a root window
|
// Returns TRUE if this window is a root window
|
||||||
#define IsRoot(pWin) \
|
#define IsRoot(pWin) \
|
||||||
((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum])
|
((pWin) == (pWin)->drawable.pScreen->root)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -493,7 +493,7 @@ static void expose_1 (WindowPtr pWin) {
|
||||||
void
|
void
|
||||||
RootlessScreenExpose (ScreenPtr pScreen)
|
RootlessScreenExpose (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
expose_1 (WindowTable[pScreen->myNum]);
|
expose_1 (pScreen->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ RootlessOrderAllWindows (void)
|
||||||
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
|
RL_DEBUG_MSG("RootlessOrderAllWindows() ");
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
if (screenInfo.screens[i] == NULL) continue;
|
if (screenInfo.screens[i] == NULL) continue;
|
||||||
pWin = WindowTable[i];
|
pWin = screenInfo.screens[i]->root;
|
||||||
if (pWin == NULL) continue;
|
if (pWin == NULL) continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
|
||||||
|
@ -1533,7 +1533,7 @@ void
|
||||||
RootlessEnableRoot (ScreenPtr pScreen)
|
RootlessEnableRoot (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr pRoot;
|
WindowPtr pRoot;
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
|
|
||||||
RootlessEnsureFrame (pRoot);
|
RootlessEnsureFrame (pRoot);
|
||||||
(*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
|
(*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE);
|
||||||
|
@ -1546,7 +1546,7 @@ RootlessDisableRoot (ScreenPtr pScreen)
|
||||||
WindowPtr pRoot;
|
WindowPtr pRoot;
|
||||||
RootlessWindowRec *winRec;
|
RootlessWindowRec *winRec;
|
||||||
|
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
winRec = WINREC (pRoot);
|
winRec = WINREC (pRoot);
|
||||||
|
|
||||||
if (NULL == winRec)
|
if (NULL == winRec)
|
||||||
|
@ -1572,8 +1572,10 @@ RootlessHideAllWindows (void)
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pWin = WindowTable[i];
|
if (pScreen == NULL)
|
||||||
if (pScreen == NULL || pWin == NULL)
|
continue;
|
||||||
|
pWin = pScreen->root;
|
||||||
|
if (pWin == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
||||||
|
@ -1609,8 +1611,10 @@ RootlessShowAllWindows (void)
|
||||||
for (i = 0; i < screenInfo.numScreens; i++)
|
for (i = 0; i < screenInfo.numScreens; i++)
|
||||||
{
|
{
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pWin = WindowTable[i];
|
if (pScreen == NULL)
|
||||||
if (pScreen == NULL || pWin == NULL)
|
continue;
|
||||||
|
pWin = pScreen->root;
|
||||||
|
if (pWin == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib)
|
||||||
|
|
|
@ -73,7 +73,7 @@ RREditConnectionInfo (ScreenPtr pScreen)
|
||||||
void
|
void
|
||||||
RRSendConfigNotify (ScreenPtr pScreen)
|
RRSendConfigNotify (ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
WindowPtr pWin = pScreen->root;
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
|
||||||
event.u.u.type = ConfigureNotify;
|
event.u.u.type = ConfigureNotify;
|
||||||
|
@ -97,7 +97,7 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
|
||||||
rrScrPriv (pScreen);
|
rrScrPriv (pScreen);
|
||||||
xRRScreenChangeNotifyEvent se;
|
xRRScreenChangeNotifyEvent se;
|
||||||
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
|
RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL;
|
||||||
WindowPtr pRoot = WindowTable[pScreen->myNum];
|
WindowPtr pRoot = pScreen->root;
|
||||||
|
|
||||||
se.type = RRScreenChangeNotify + RREventBase;
|
se.type = RRScreenChangeNotify + RREventBase;
|
||||||
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
|
se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0);
|
||||||
|
@ -620,7 +620,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
rep.setOfRotations = RR_Rotate_0;
|
rep.setOfRotations = RR_Rotate_0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
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.timestamp = currentTime.milliseconds;
|
||||||
rep.configTimestamp = currentTime.milliseconds;
|
rep.configTimestamp = currentTime.milliseconds;
|
||||||
rep.nSizes = 0;
|
rep.nSizes = 0;
|
||||||
|
@ -649,7 +649,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
rep.setOfRotations = output->crtc->rotations;
|
rep.setOfRotations = output->crtc->rotations;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
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.timestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
||||||
rep.rotation = output->crtc->rotation;
|
rep.rotation = output->crtc->rotation;
|
||||||
|
@ -961,7 +961,7 @@ sendReply:
|
||||||
|
|
||||||
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds;
|
||||||
rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id;
|
rep.root = pDraw->pScreen->root->drawable.id;
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
|
|
|
@ -216,7 +216,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
pRoot = WindowTable[pScreen->myNum];
|
pRoot = pScreen->root;
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
|
@ -2681,7 +2681,7 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
||||||
newPict->info[0].id = stuff->pid;
|
newPict->info[0].id = stuff->pid;
|
||||||
|
|
||||||
if (refDraw->type == XRT_WINDOW &&
|
if (refDraw->type == XRT_WINDOW &&
|
||||||
stuff->drawable == WindowTable[0]->drawable.id)
|
stuff->drawable == screenInfo.screens[0]->root->drawable.id)
|
||||||
{
|
{
|
||||||
newPict->u.pict.root = TRUE;
|
newPict->u.pict.root = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -690,7 +690,7 @@ ReplaceCursor (CursorPtr pCursor,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
|
/* this "knows" that WindowHasNewCursor doesn't depend on it's argument */
|
||||||
WindowHasNewCursor (WindowTable[0]);
|
WindowHasNewCursor (screenInfo.screens[0]->root);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
|
@ -43,6 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
#include "property.h"
|
#include "property.h"
|
||||||
|
#include "scrnintstr.h"
|
||||||
#define XKBSRV_NEED_FILE_FUNCS
|
#define XKBSRV_NEED_FILE_FUNCS
|
||||||
#include <xkbsrv.h>
|
#include <xkbsrv.h>
|
||||||
#include "xkbgeom.h"
|
#include "xkbgeom.h"
|
||||||
|
@ -210,7 +211,7 @@ char * pval;
|
||||||
ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
|
ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n",
|
||||||
out,len);
|
out,len);
|
||||||
}
|
}
|
||||||
dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8,
|
dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8,
|
||||||
PropModeReplace, len, pval, TRUE);
|
PropModeReplace, len, pval, TRUE);
|
||||||
free(pval);
|
free(pval);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue