summaryrefslogtreecommitdiff
path: root/hw/xwin
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 /hw/xwin
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 'hw/xwin')
-rw-r--r--hw/xwin/winscrinit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 4fa987cd9..7add0e3f4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -243,11 +243,11 @@ winScreenInit (int index,
Note the screen origin in a normalized coordinate space where (0,0) is at the top left
of the native virtual desktop area
*/
- dixScreenOrigins[index].x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
- dixScreenOrigins[index].y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
+ pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
+ pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
- index, dixScreenOrigins[index].x, dixScreenOrigins[index].y);
+ index, pScreen->x, pScreen->y);
#if CYGDEBUG || YES
winDebug ("winScreenInit - returning\n");