aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/window.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-20 12:18:53 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-21 04:09:16 +0200
commitc61bb8cc59bf645f1bf4dbc5fd5464d559b3ecad (patch)
tree99b43f999db460959346ca3d29d261052deb6b3d /nx-X11/programs/Xserver/dix/window.c
parent590862d39d6e7cea6425416a5ef6fa2e747bcc0c (diff)
downloadnx-libs-c61bb8cc59bf645f1bf4dbc5fd5464d559b3ecad.tar.gz
nx-libs-c61bb8cc59bf645f1bf4dbc5fd5464d559b3ecad.tar.bz2
nx-libs-c61bb8cc59bf645f1bf4dbc5fd5464d559b3ecad.zip
Move each screen's root-window pointer into ScreenRec.
Backported from X.org: commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 22 00:26:28 2010 -0700 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) Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/dix/window.c')
-rw-r--r--nx-X11/programs/Xserver/dix/window.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index 6221af4d1..5a4818f88 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -191,7 +191,7 @@ PrintWindowTree()
for (i=0; i<screenInfo.numScreens; i++)
{
ErrorF( "WINDOW %d\n", i);
- pWin = WindowTable[i];
+ pWin = screenInfo.screens[i]->root;
RegionPrint(&pWin->clipList);
p1 = pWin->firstChild;
PrintChildren(p1, 4);
@@ -237,7 +237,7 @@ TraverseTree(register WindowPtr pWin, VisitWindowProcPtr func, void * data)
int
WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void * data)
{
- return(TraverseTree(WindowTable[pScreen->myNum], func, data));
+ return(TraverseTree(pScreen->root, func, data));
}
/* hack for forcing backing store on all windows */
@@ -384,7 +384,7 @@ CreateRootWindow(ScreenPtr pScreen)
savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL;
screenIsSaved = SCREEN_SAVER_OFF;
- WindowTable[pScreen->myNum] = pWin;
+ pScreen->root = pWin;
pWin->drawable.pScreen = pScreen;
pWin->drawable.type = DRAWABLE_WINDOW;
@@ -1348,7 +1348,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
*/
if ( cursorID == None)
{
- if (pWin == WindowTable[pWin->drawable.pScreen->myNum])
+ if (pWin == pWin->drawable.pScreen->root)
pCursor = rootCursor;
else
pCursor = (CursorPtr) None;
@@ -3088,7 +3088,7 @@ HandleSaveSet(register 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
{
@@ -3382,9 +3382,9 @@ TileScreenSaver(int i, int kind)
attri = 0;
switch (kind) {
case SCREEN_IS_TILED:
- switch (WindowTable[i]->backgroundState) {
+ switch (screenInfo.screens[i]->root->backgroundState) {
case BackgroundPixel:
- attributes[attri++] = WindowTable[i]->background.pixel;
+ attributes[attri++] = screenInfo.screens[i]->root->background.pixel;
mask |= CWBackPixel;
break;
case BackgroundPixmap:
@@ -3396,7 +3396,7 @@ TileScreenSaver(int i, int kind)
}
break;
case SCREEN_IS_BLACK:
- attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel;
+ attributes[attri++] = screenInfo.screens[i]->root->drawable.pScreen->blackPixel;
mask |= CWBackPixel;
break;
}
@@ -3444,12 +3444,12 @@ TileScreenSaver(int i, int kind)
pWin = savedScreenInfo[i].pWindow =
CreateWindow(savedScreenInfo[i].wid,
- WindowTable[i],
+ screenInfo.screens[i]->root,
-RANDOM_WIDTH, -RANDOM_WIDTH,
(unsigned short)screenInfo.screens[i]->width + RANDOM_WIDTH,
(unsigned short)screenInfo.screens[i]->height + RANDOM_WIDTH,
0, InputOutput, mask, attributes, 0, serverClient,
- wVisual (WindowTable[i]), &result);
+ wVisual (screenInfo.screens[i]->root), &result);
if (cursor)
FreeResource (cursorID, RT_NONE);