mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-24 20:55:49 +00:00
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
52 changed files with 130 additions and 128 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ static void expose_1 (WindowPtr pWin) {
|
|||
void
|
||||
RootlessScreenExpose (ScreenPtr pScreen)
|
||||
{
|
||||
expose_1 (WindowTable[pScreen->myNum]);
|
||||
expose_1 (pScreen->root);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue