From a83cff9f4d622b069c96a68b4e87a669bf1f6446 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sun, 23 May 2010 10:11:47 -0700 Subject: Move each screen's x/y origin into ScreenRec. Many references to the dixScreenOrigins array already had the corresponding screen pointer handy, which meant they usually looked like "dixScreenOrigins[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 declared the dixScreenOrigins array, I figure allocating a screen private for these values is overkill. Signed-off-by: Jamey Sharp Reviewed-by: Tiago Vignatti Tested-by: Tiago Vignatti (i686 GNU/Linux) --- miext/rootless/rootlessWindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'miext') diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 5955cd99c..ce088c7dc 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -53,9 +53,9 @@ extern Bool no_configure_window; #ifdef ROOTLESS_GLOBAL_COORDS #define SCREEN_TO_GLOBAL_X \ - (dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX) + (pScreen->x + rootlessGlobalOffsetX) #define SCREEN_TO_GLOBAL_Y \ - (dixScreenOrigins[pScreen->myNum].y + rootlessGlobalOffsetY) + (pScreen->y + rootlessGlobalOffsetY) #else #define SCREEN_TO_GLOBAL_X 0 #define SCREEN_TO_GLOBAL_Y 0 @@ -109,8 +109,8 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; - sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + sx = pWin->drawable.pScreen->x + darwinMainScreenX; + sy = pWin->drawable.pScreen->y + darwinMainScreenY; /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ vlist[0] = (INT16) bounds.x1 - sx; -- cgit v1.2.3