diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-23 10:11:47 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-03 14:03:23 -0700 |
commit | a83cff9f4d622b069c96a68b4e87a669bf1f6446 (patch) | |
tree | b29de5e363feb6b7546ce69dfa0685316bf0b234 /hw/xquartz/applewm.c | |
parent | 217ccaa5a341018457f468a774c035c0df47d918 (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/xquartz/applewm.c')
-rw-r--r-- | hw/xquartz/applewm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index 0845f67f0..1c77ad984 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -140,10 +140,8 @@ AppleWMSetScreenOrigin( { int32_t data[2]; - data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x - + darwinMainScreenX); - data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y - + darwinMainScreenY); + data[0] = pWin->drawable.pScreen->x + darwinMainScreenX; + data[1] = pWin->drawable.pScreen->y + darwinMainScreenY; dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); |