diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-22 00:26:28 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-03 14:03:23 -0700 |
commit | e7fae9ecc42ab5e73b89117722dbf4117d928f9a (patch) | |
tree | b7897e7a64fe01e3989ec1e7a5a7db69797126e6 /hw/xquartz/xpr | |
parent | 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 (diff) |
Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix uses this data, a screen private entry isn't appropriate.
xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Diffstat (limited to 'hw/xquartz/xpr')
-rw-r--r-- | hw/xquartz/xpr/xprFrame.c | 2 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprScreen.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c index 53dde7acc..6dc2c87fa 100644 --- a/hw/xquartz/xpr/xprFrame.c +++ b/hw/xquartz/xpr/xprFrame.c @@ -576,7 +576,7 @@ xprHideWindows(Bool hide) for (screen = 0; screen < screenInfo.numScreens; screen++) { RootlessFrameID prevWid = NULL; - pRoot = WindowTable[screenInfo.screens[screen]->myNum]; + pRoot = screenInfo.screens[screen]->root; for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { RootlessWindowRec *winRec = WINREC(pWin); diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index d574721b3..87e97d4e2 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -397,7 +397,7 @@ xprUpdateScreen(ScreenPtr pScreen) rootlessGlobalOffsetX = darwinMainScreenX; rootlessGlobalOffsetY = darwinMainScreenY; - AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); + AppleWMSetScreenOrigin(pScreen->root); RootlessRepositionWindows(pScreen); RootlessUpdateScreenPixmap(pScreen); @@ -416,7 +416,7 @@ xprInitInput(int argc, char **argv) rootlessGlobalOffsetY = darwinMainScreenY; for (i = 0; i < screenInfo.numScreens; i++) - AppleWMSetScreenOrigin(WindowTable[i]); + AppleWMSetScreenOrigin(screenInfo.screens[i]->root); } /* |