summaryrefslogtreecommitdiff
path: root/miext/rootless
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-23 10:11:47 -0700
committerJamey Sharp <jamey@minilop.net>2010-06-03 14:03:23 -0700
commita83cff9f4d622b069c96a68b4e87a669bf1f6446 (patch)
treeb29de5e363feb6b7546ce69dfa0685316bf0b234 /miext/rootless
parent217ccaa5a341018457f468a774c035c0df47d918 (diff)
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 <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 'miext/rootless')
-rw-r--r--miext/rootless/rootlessWindow.c8
1 files changed, 4 insertions, 4 deletions
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;