From e7fae9ecc42ab5e73b89117722dbf4117d928f9a Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 22 May 2010 00:26:28 -0700 Subject: 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 Reviewed-by: Tiago Vignatti Tested-by: Tiago Vignatti (i686 GNU/Linux) --- composite/compinit.c | 2 +- composite/compoverlay.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'composite') diff --git a/composite/compinit.c b/composite/compinit.c index a81cc740f..e4b68c822 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -141,7 +141,7 @@ compScreenUpdate (ScreenPtr pScreen) compCheckTree (pScreen); if (cs->damaged) { - compWindowUpdate (WindowTable[pScreen->myNum]); + compWindowUpdate (pScreen->root); cs->damaged = FALSE; } } diff --git a/composite/compoverlay.c b/composite/compoverlay.c index 2158cdb5a..67b566c7f 100644 --- a/composite/compoverlay.c +++ b/composite/compoverlay.c @@ -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; -- cgit v1.2.3