summaryrefslogtreecommitdiff
path: root/Xext/shm.c
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 /Xext/shm.c
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 'Xext/shm.c')
-rw-r--r--Xext/shm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Xext/shm.c b/Xext/shm.c
index 99cd39ed3..322709c17 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -598,8 +598,8 @@ ProcPanoramiXShmPutImage(ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
- stuff->dstX = orig_x - dixScreenOrigins[j].x;
- stuff->dstY = orig_y - dixScreenOrigins[j].y;
+ stuff->dstX = orig_x - screenInfo.screens[j]->x;
+ stuff->dstY = orig_y - screenInfo.screens[j]->y;
}
result = ProcShmPutImage(client);
if(result != Success) break;
@@ -660,10 +660,10 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return(BadMatch);
} else {
if( /* check for being onscreen */
- dixScreenOrigins[0].x + pDraw->x + x < 0 ||
- dixScreenOrigins[0].x + pDraw->x + x + w > PanoramiXPixWidth ||
- dixScreenOrigins[0].y + pDraw->y + y < 0 ||
- dixScreenOrigins[0].y + pDraw->y + y + h > PanoramiXPixHeight ||
+ screenInfo.screens[0]->x + pDraw->x + x < 0 ||
+ screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth ||
+ screenInfo.screens[0]->y + pDraw->y + y < 0 ||
+ screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight ||
/* check for being inside of border */
x < - wBorderWidth((WindowPtr)pDraw) ||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||