[Xorg-commit] xc/programs/Xserver/dix colormap.c,1.1.4.2,1.1.4.3 dispatch.c,1.1.4.2,1.1.4.3 dixfonts.c,1.1.4.2,1.1.4.3 events.c,1.1.4.2,1.1.4.3 main.c,1.1.4.3,1.1.4.4 resource.c,1.1.4.2,1.1.4.3 window.c,1.1.4.2,1.1.4.3

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Thu Dec 18 21:29:45 EET 2003


Committed by: kaleb

Update of /cvs/xorg/xc/programs/Xserver/dix
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/Xserver/dix

Modified Files:
      Tag: XORG-CURRENT
	colormap.c dispatch.c dixfonts.c events.c main.c resource.c 
	window.c 
Log Message:
First pass at "Standard" Xinerama.
The sources for this came from Heather Lanigan's xinerama tree on 
Sourceforge.Net. 
No attempt has been made to handle previous, non-standard versions of 
the protocol. Nor has any attempt been made to preserve the ABI of 
previous versions -- that part will be added at a later time, and 
then probably only on systems that have nice object/linker semantics, 
e.g. ELF systems with weak symbols.



Index: colormap.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/colormap.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- colormap.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ colormap.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.12 2003/11/17 22:20:33 dawes Exp $ */
 /***********************************************************
 
@@ -61,6 +62,11 @@
 #ifdef LBX
 #include "lbxserve.h"
 #endif
+#ifdef XINERAMA
+#include "xinerama.h"
+#include "xineramaSrv.h"
+extern Bool noXineramaExtension;
+#endif
 
 extern XID clientErrorValue;
 extern int colormapPrivateCount;
@@ -474,16 +480,23 @@
 
     if (wColormap(pwin) == *pmid)
     {
+#ifdef XINERAMA
+	/*
+	 * Only deliver event for Screen 0 when Xinerama enabled
+	 */
+        if (noXineramaExtension || 
+	    (!noXineramaExtension && !(pwin->drawable.pScreen->myNum))) {
+#endif
 	/* This should be call to DeliverEvent */
 	xE.u.u.type = ColormapNotify;
 	xE.u.colormap.window = pwin->drawable.id;
 	xE.u.colormap.colormap = None;
 	xE.u.colormap.new = TRUE;
 	xE.u.colormap.state = ColormapUninstalled;
-#ifdef PANORAMIX
-        if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum)
+	DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
+#ifdef XINERAMA
+      }
 #endif
-	   DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
 	if (pwin->optional) {
 	    pwin->optional->colormap = None;
 	    CheckWindowOptionalNeed (pwin);
@@ -502,9 +515,12 @@
     Colormap 	*pmid = (Colormap *)value;
     xEvent 	xE;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
-	return WT_STOPWALKING;
+#ifdef XINERAMA
+  /*
+   * Only deliver event for Screen 0 when Xinerama enabled
+   */
+  if (noXineramaExtension || 
+      (!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
 #endif
     if (wColormap(pwin) == *pmid)
     {
@@ -529,9 +545,12 @@
     Colormap 	*pmid = (Colormap *)value;
     xEvent 	xE;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
-	return WT_STOPWALKING;
+#ifdef XINERAMA
+  /*
+   * Only deliver event for Screen 0 when Xinerama enabled
+   */
+  if (noXineramaExtension || 
+      (!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
 #endif
     if (wColormap (pwin) == *pmid)
     {

Index: dispatch.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/dispatch.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- dispatch.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ dispatch.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
 /************************************************************
 
@@ -46,7 +47,7 @@
 
 ********************************************************/
 
-/* The panoramix components contained the following notice */
+/* The Xinerama components contained the following notice */
 /****************************************************************
 *                                                               *
 *    Copyright (c) Digital Equipment Corporation, 1991, 1997    *
@@ -70,7 +71,7 @@
 
 /* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.33 2003/11/17 22:20:33 dawes Exp $ */
 
-#ifdef PANORAMIX_DEBUG
+#ifdef XINERAMA_DEBUG
 #include <stdio.h>
 int ProcInitialConnection();
 #endif
@@ -91,9 +92,9 @@
 #include "dispatch.h"
 #include "swaprep.h"
 #include "swapreq.h"
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
+#ifdef XINERAMA
+#include "xinerama.h"
+#include "xineramaSrv.h"
 #endif
 #ifdef XCSECURITY
 #define _SECURITY_SERVER
@@ -2641,8 +2642,8 @@
 	    else
 	        return (retval);
 	}
-#ifdef PANORAMIX
-	if (noPanoramiXExtension || !pmap->pScreen->myNum)
+#ifdef XINERAMA
+	if (noXineramaExtension || !pmap->pScreen->myNum)
 #endif
         WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
 	return (client->noClientException);
@@ -2700,8 +2701,8 @@
                 else
     	            return(retval);
 	    }
-#ifdef PANORAMIX
-	    if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#ifdef XINERAMA
+	    if (noXineramaExtension || !pcmp->pScreen->myNum)
 #endif
             WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
 	    return (client->noClientException);
@@ -2770,8 +2771,8 @@
 	    else
 	        return(retval);
 	}
-#ifdef PANORAMIX
-	if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#ifdef XINERAMA
+	if (noXineramaExtension || !pcmp->pScreen->myNum)
 #endif
 	{
 	    accr.type = X_Reply;
@@ -2849,8 +2850,8 @@
 	        return(retval);
 	}
 	acpr.length = length >> 2;
-#ifdef PANORAMIX
-	if (noPanoramiXExtension || !pcmp->pScreen->myNum)
+#ifdef XINERAMA
+	if (noXineramaExtension || !pcmp->pScreen->myNum)
 #endif
 	{
 	    WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr);
@@ -3932,8 +3933,8 @@
 #endif
     /* fill in the "currentInputMask" */
     root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart);
-#ifdef PANORAMIX
-    if (noPanoramiXExtension)
+#ifdef XINERAMA
+    if (noXineramaExtension)
 	numScreens = screenInfo.numScreens;
     else 
         numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;

Index: dixfonts.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/dixfonts.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- dixfonts.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ dixfonts.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.29 2003/11/17 22:20:34 dawes Exp $ */
 /************************************************************************
 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
@@ -41,8 +42,9 @@
 #include	<stdio.h>
 #endif
 
-#ifdef PANORAMIX
-#include "panoramiX.h"
+#ifdef XINERAMA
+#include "xinerama.h"
+extern Bool noXineramaExtension;
 #endif
 
 #ifdef LBX
@@ -1398,8 +1400,8 @@
 
     if (c->err != Success) err = c->err;
     if (err != Success && c->client != serverClient) {
-#ifdef PANORAMIX
-        if (noPanoramiXExtension || !c->pGC->pScreen->myNum)
+#ifdef XINERAMA
+        if (noXineramaExtension || !c->pGC->pScreen->myNum)
 #endif
 	    SendErrorToClient(c->client, c->reqType, 0, 0, err);
     }

Index: events.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/events.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- events.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ events.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $XFree86: xc/programs/Xserver/dix/events.c,v 3.50 2003/11/17 22:20:34 dawes Exp $ */
 /************************************************************
 
@@ -46,7 +47,7 @@
 
 ********************************************************/
 
-/* The panoramix components contained the following notice */
+/* The Xinerama components contained the following notice */
 /****************************************************************
 *                                                               *
 *    Copyright (c) Digital Equipment Corporation, 1991, 1997    *
@@ -82,9 +83,9 @@
 #include "cursorstr.h"
 
 #include "dixstruct.h"
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
+#ifdef XINERAMA
+#include "xinerama.h"
+#include "xineramaSrv.h"
 #endif
 #include "globals.h"
 
@@ -140,7 +141,6 @@
 
 #define XE_KBPTR (xE->u.keyButtonPointer)
 
-
 #define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
 
 CallbackListPtr EventCallback;
@@ -183,14 +183,14 @@
     CursorPtr	current;
     BoxRec	hotLimits;	/* logical constraints of hot spot */
     Bool	confined;	/* confined to screen */
-#if defined(SHAPE) || defined(PANORAMIX)
+#if defined(SHAPE) || defined(XINERAMA)
     RegionPtr	hotShape;	/* additional logical shape constraint */
 #endif
     BoxRec	physLimits;	/* physical constraints of hot spot */
     WindowPtr	win;		/* window of logical position */
     HotSpot	hot;		/* logical pointer position */
     HotSpot	hotPhys;	/* physical pointer position */
-#ifdef PANORAMIX
+#ifdef XINERAMA
     ScreenPtr	screen;		/* all others are in Screen 0 coordinates */
     RegionRec   Reg1;	        /* Region 1 for confining motion */
     RegionRec   Reg2;		/* Region 2 for confining virtual motion */
@@ -263,9 +263,8 @@
     0x7c				/* key and button events */
 };
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 
-static void ConfineToShape(RegionPtr shape, int *px, int *py);
 static void SyntheticMotion(int x, int y);
 static void PostNewCursor(void);
 
@@ -284,8 +283,8 @@
        that screen are. */
 
     pScreen = sprite.screen;
-    x += panoramiXdataPtr[0].x;
-    y += panoramiXdataPtr[0].y;
+    x += xineramaDataPtr[0].x;
+    y += xineramaDataPtr[0].y;
 
     if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
 								x, y, &box)) 
@@ -303,10 +302,10 @@
     }
 
     sprite.screen = pScreen;
-    sprite.hotPhys.x = x - panoramiXdataPtr[0].x;
-    sprite.hotPhys.y = y - panoramiXdataPtr[0].y;
-    x -= panoramiXdataPtr[pScreen->myNum].x;
-    y -= panoramiXdataPtr[pScreen->myNum].y;
+    sprite.hotPhys.x = x - xineramaDataPtr[0].x;
+    sprite.hotPhys.y = y - xineramaDataPtr[0].y;
+    x -= xineramaDataPtr[pScreen->myNum].x;
+    y -= xineramaDataPtr[pScreen->myNum].y;
 
     return (*pScreen->SetCursorPosition)(pScreen, x, y, generateEvent);
 }
@@ -320,14 +319,19 @@
 
     /* Translate the constraining box to the screen
        the sprite is actually on */
-    newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
-    newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
-    newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
-    newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
+    newBox.x1 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
+    newBox.x2 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
+    newBox.y1 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
+    newBox.y2 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
 
     (* pScreen->ConstrainCursor)(pScreen, &newBox);
 }
 
+#ifdef SHAPE
+static void
+ConfineToShape(RegionPtr, int *, int *);
+#endif
+
 static void
 XineramaCheckPhysLimits(
     CursorPtr cursor,
@@ -375,17 +379,17 @@
 {
     if(pWin == WindowTable[0]) {
 	    memcpy(sprite.windows, WindowTable, 
-				PanoramiXNumScreens*sizeof(WindowPtr));
+				XineramaNumScreens*sizeof(WindowPtr));
     } else {
-	PanoramiXRes *win;
+	XineramaRes *win;
 	int i;
 
-	win = (PanoramiXRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
+	win = (XineramaRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
 
 	if(!win)
 	    return FALSE;
 
-	for(i = 0; i < PanoramiXNumScreens; i++) {
+	for(i = 0; i < XineramaNumScreens; i++) {
 	   sprite.windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW);
 	   if(!sprite.windows[i])  /* window is being unmapped */
 		return FALSE;
@@ -416,16 +420,16 @@
 	if(!XineramaSetWindowPntrs(pWin))
 	    return;
 
-	i = PanoramiXNumScreens - 1;
+	i = XineramaNumScreens - 1;
 	
 	REGION_COPY(sprite.screen, &sprite.Reg2, 
 					&sprite.windows[i]->borderSize); 
-	off_x = panoramiXdataPtr[i].x;
-	off_y = panoramiXdataPtr[i].y;
+	off_x = xineramaDataPtr[i].x;
+	off_y = xineramaDataPtr[i].y;
 
 	while(i--) {
-	    x = off_x - panoramiXdataPtr[i].x;
-	    y = off_y - panoramiXdataPtr[i].y;
+	    x = off_x - xineramaDataPtr[i].x;
+	    y = off_y - xineramaDataPtr[i].y;
 
 	    if(x || y)
 		REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
@@ -433,8 +437,8 @@
 	    REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2, 
 					&sprite.windows[i]->borderSize);
 
-	    off_x = panoramiXdataPtr[i].x;
-	    off_y = panoramiXdataPtr[i].y;
+	    off_x = xineramaDataPtr[i].x;
+	    off_y = xineramaDataPtr[i].y;
 	}
 
 	lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
@@ -471,10 +475,10 @@
 	/* Motion events entering DIX get translated to Screen 0
 	   coordinates.  Replayed events have already been 
 	   translated since they've entered DIX before */
-	XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
-			  panoramiXdataPtr[0].x;
-	XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
-			  panoramiXdataPtr[0].y;
+	XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
+			  xineramaDataPtr[0].x;
+	XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
+			  xineramaDataPtr[0].y;
 
 	sprite.hot.x = XE_KBPTR.rootX;
 	sprite.hot.y = XE_KBPTR.rootY;
@@ -533,16 +537,16 @@
 	if(!XineramaSetWindowPntrs(pWin))
 	    return;
 
-	i = PanoramiXNumScreens - 1;
+	i = XineramaNumScreens - 1;
 	
 	REGION_COPY(sprite.screen, &sprite.Reg1, 
 					&sprite.windows[i]->borderSize); 
-	off_x = panoramiXdataPtr[i].x;
-	off_y = panoramiXdataPtr[i].y;
+	off_x = xineramaDataPtr[i].x;
+	off_y = xineramaDataPtr[i].y;
 
 	while(i--) {
-	    x = off_x - panoramiXdataPtr[i].x;
-	    y = off_y - panoramiXdataPtr[i].y;
+	    x = off_x - xineramaDataPtr[i].x;
+	    y = off_y - xineramaDataPtr[i].y;
 
 	    if(x || y)
 		REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
@@ -550,8 +554,8 @@
 	    REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1, 
 					&sprite.windows[i]->borderSize);
 
-	    off_x = panoramiXdataPtr[i].x;
-	    off_y = panoramiXdataPtr[i].y;
+	    off_x = xineramaDataPtr[i].x;
+	    off_y = xineramaDataPtr[i].y;
 	}
 
 	sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
@@ -583,7 +587,7 @@
 }
 
 
-#endif  /* PANORAMIX */
+#endif  /* XINERAMA */
 
 void
 SetMaskForEvent(mask, event)
@@ -609,13 +613,13 @@
 {
     xEvent xE;
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
     /* Translate back to the sprite screen since processInputProc
        will translate from sprite screen to screen 0 upon reentry
        to the DIX layer */
-    if(!noPanoramiXExtension) {
-	x += panoramiXdataPtr[0].x - panoramiXdataPtr[sprite.screen->myNum].x;
-	y += panoramiXdataPtr[0].y - panoramiXdataPtr[sprite.screen->myNum].y;
+    if(!noXineramaExtension) {
+	x += xineramaDataPtr[0].x - xineramaDataPtr[sprite.screen->myNum].x;
+	y += xineramaDataPtr[0].y - xineramaDataPtr[sprite.screen->myNum].y;
     }
 #endif
     xE.u.keyButtonPointer.rootX = x;
@@ -716,8 +720,9 @@
     register QdEventPtr qe,
     register WindowPtr pWin)
 {
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
+
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
 	XineramaCheckVirtualMotion(qe, pWin);
 	return;
     }
@@ -767,8 +772,8 @@
 {
     ScreenPtr pScreen = pWin->drawable.pScreen;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
 	XineramaConfineCursorToWindow(pWin, generateEvents);
 	return;
     }	
@@ -800,8 +805,8 @@
 static void
 ChangeToCursor(CursorPtr cursor)
 {
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
 	XineramaChangeToCursor(cursor);
 	return;
     }
@@ -885,17 +890,17 @@
     *py = sprite.hotPhys.y;
 }
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 int
 XineramaGetCursorScreen()
 {
-    if(!noPanoramiXExtension) {
+    if(!noXineramaExtension) {
 	return sprite.screen->myNum;
     } else {
 	return 0;
     }
 }
-#endif /* PANORAMIX */
+#endif /* XINERAMA */
 
 #define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
 
@@ -969,12 +974,12 @@
     }
     if (xE->u.u.type == MotionNotify)
     {
-#ifdef PANORAMIX
-	if(!noPanoramiXExtension) {
-	    XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
-			      panoramiXdataPtr[0].x;
-	    XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
-			      panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+	if(!noXineramaExtension) {
+	    XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
+			      xineramaDataPtr[0].x;
+	    XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
+			      xineramaDataPtr[0].y;
 	}
 #endif
 	sprite.hotPhys.x = XE_KBPTR.rootX;
@@ -1025,17 +1030,17 @@
 		CheckVirtualMotion(qe, NullWindow);
 	    syncEvents.time.months = qe->months;
 	    syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time;
-#ifdef PANORAMIX
+#ifdef XINERAMA
 	   /* Translate back to the sprite screen since processInputProc
 	      will translate from sprite screen to screen 0 upon reentry
 	      to the DIX layer */
-	    if(!noPanoramiXExtension) {
+	    if(!noXineramaExtension) {
 		qe->event->u.keyButtonPointer.rootX += 
-			panoramiXdataPtr[0].x - 
-			panoramiXdataPtr[sprite.screen->myNum].x;
+			xineramaDataPtr[0].x - 
+			xineramaDataPtr[sprite.screen->myNum].x;
 		qe->event->u.keyButtonPointer.rootY += 
-			panoramiXdataPtr[0].y - 
-			panoramiXdataPtr[sprite.screen->myNum].y;
+			xineramaDataPtr[0].y - 
+			xineramaDataPtr[sprite.screen->myNum].y;
 	    }
 #endif
 	    (*qe->device->public.processInputProc)(qe->event, qe->device,
@@ -1664,7 +1669,7 @@
    Only works for core events.
 */
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 static int 
 XineramaTryClientEventsResult(
     ClientPtr client,
@@ -1697,8 +1702,8 @@
     {
         if (wClient(pWin) == dontClient)
 	    return 0;
-#ifdef PANORAMIX
-	if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) 
+#ifdef XINERAMA
+	if(!noXineramaExtension && pWin->drawable.pScreen->myNum) 
 	    return XineramaTryClientEventsResult(
 			wClient(pWin), NullGrab, pWin->eventMask, filter);
 #endif
@@ -1711,8 +1716,8 @@
 	{
             if (SameClient(other, dontClient))
 		return 0;
-#ifdef PANORAMIX
-	    if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) 
+#ifdef XINERAMA
+	    if(!noXineramaExtension && pWin->drawable.pScreen->myNum) 
 	      return XineramaTryClientEventsResult(
 			rClient(other), NullGrab, other->mask, filter);
 #endif
@@ -1854,8 +1859,8 @@
     Mask filter;
     int     deliveries;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
+#ifdef XINERAMA
+    if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
 	return count;
 #endif
 
@@ -1885,7 +1890,7 @@
     return deliveries;
 }
 
-
+#ifndef NO_XINERAMA_PORT
 static Bool 
 PointInBorderSize(WindowPtr pWin, int x, int y)
 {
@@ -1894,15 +1899,15 @@
     if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
 	return TRUE;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
+#ifdef XINERAMA
+    if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
 	int i;
 
-	for(i = 1; i < PanoramiXNumScreens; i++) {
+	for(i = 1; i < XineramaNumScreens; i++) {
 	   if(POINT_IN_REGION(sprite.screen, 
 			&sprite.windows[i]->borderSize, 
-			x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, 
-			y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, 
+			x + xineramaDataPtr[0].x - xineramaDataPtr[i].x, 
+			y + xineramaDataPtr[0].y - xineramaDataPtr[i].y, 
 			&box))
 		return TRUE;
 	}
@@ -1910,6 +1915,7 @@
 #endif
     return FALSE;
 }
+#endif /* NO_XINERAMA_PORT */
 
 static WindowPtr 
 XYToWindow(int x, int y)
@@ -1932,7 +1938,13 @@
 		 * is made to see if the point is inside
 		 * borderSize
 		 */
+#ifndef NO_XINERAMA_PORT
 		&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
+#else
+		&& (!wBoundingShape(pWin) ||
+		    POINT_IN_REGION(pWin->drawable.pScreen,
+			    &pWin->borderSize, x, y, &box))
+#endif
 #endif
 		)
 	{
@@ -1958,8 +1970,8 @@
 {
     WindowPtr prevSpriteWin = sprite.win;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension)
+#ifdef XINERAMA
+    if(!noXineramaExtension)
 	return XineramaCheckMotion(xE);
 #endif
 
@@ -2047,12 +2059,12 @@
     (*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE);
     (*pScreen->DisplayCursor) (pScreen, sprite.current);
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
-	sprite.hotLimits.x1 = -panoramiXdataPtr[0].x;
-	sprite.hotLimits.y1 = -panoramiXdataPtr[0].y;
-	sprite.hotLimits.x2 = PanoramiXPixWidth  - panoramiXdataPtr[0].x;
-	sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
+	sprite.hotLimits.x1 = -xineramaDataPtr[0].x;
+	sprite.hotLimits.y1 = -xineramaDataPtr[0].y;
+	sprite.hotLimits.x2 = XineramaPixWidth  - xineramaDataPtr[0].x;
+	sprite.hotLimits.y2 = XineramaPixHeight - xineramaDataPtr[0].y;
 	sprite.physLimits = sprite.hotLimits;
 	sprite.confineWin = NullWindow;
 #ifdef SHAPE
@@ -2088,12 +2100,12 @@
 {
     sprite.hotPhys.x = x;
     sprite.hotPhys.y = y;
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
-	sprite.hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - 
-			    panoramiXdataPtr[0].x;
-	sprite.hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - 
-			    panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
+	sprite.hotPhys.x += xineramaDataPtr[newScreen->myNum].x - 
+			    xineramaDataPtr[0].x;
+	sprite.hotPhys.y += xineramaDataPtr[newScreen->myNum].y - 
+			    xineramaDataPtr[0].y;
 	if (newScreen != sprite.screen) {
 	    sprite.screen = newScreen;
 	    /* Make sure we tell the DDX to update its copy of the screen */
@@ -2105,10 +2117,10 @@
 	       told of the pointer warp so we reposition it here */
 	    if(!syncEvents.playingEvents)
 		(*sprite.screen->SetCursorPosition)(sprite.screen,
-		    sprite.hotPhys.x + panoramiXdataPtr[0].x - 
-			panoramiXdataPtr[sprite.screen->myNum].x,
-		    sprite.hotPhys.y + panoramiXdataPtr[0].y - 
-			panoramiXdataPtr[sprite.screen->myNum].y, FALSE);
+		    sprite.hotPhys.x + xineramaDataPtr[0].x - 
+			xineramaDataPtr[sprite.screen->myNum].x,
+		    sprite.hotPhys.y + xineramaDataPtr[0].y - 
+			xineramaDataPtr[sprite.screen->myNum].y, FALSE);
 	}
     } else 
 #endif
@@ -2116,7 +2128,7 @@
 	ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE);
 }
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 
 static Bool
 XineramaPointInWindowIsVisible(
@@ -2136,14 +2148,14 @@
     
     if(!XineramaSetWindowPntrs(pWin)) return FALSE;
 
-    xoff = x + panoramiXdataPtr[0].x;  
-    yoff = y + panoramiXdataPtr[0].y;  
+    xoff = x + xineramaDataPtr[0].x;  
+    yoff = y + xineramaDataPtr[0].y;  
 
-    for(i = 1; i < PanoramiXNumScreens; i++) {
+    for(i = 1; i < XineramaNumScreens; i++) {
 	pWin = sprite.windows[i];
 	pScreen = pWin->drawable.pScreen;
-	x = xoff - panoramiXdataPtr[i].x;
-	y = yoff - panoramiXdataPtr[i].y;
+	x = xoff - xineramaDataPtr[i].x;
+	y = yoff - xineramaDataPtr[i].y;
 
 	if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
             return TRUE;
@@ -2183,8 +2195,8 @@
 	winX = source->drawable.x;
 	winY = source->drawable.y;
 	if(source == WindowTable[0]) {
-	    winX -= panoramiXdataPtr[0].x;
-	    winY -= panoramiXdataPtr[0].y;
+	    winX -= xineramaDataPtr[0].x;
+	    winY -= xineramaDataPtr[0].y;
 	}
 	if (x < winX + stuff->srcX ||
 	    y < winY + stuff->srcY ||
@@ -2199,8 +2211,8 @@
 	x = dest->drawable.x;
 	y = dest->drawable.y;
 	if(dest == WindowTable[0]) {
-	    x -= panoramiXdataPtr[0].x;
-	    y -= panoramiXdataPtr[0].y;
+	    x -= xineramaDataPtr[0].x;
+	    y -= xineramaDataPtr[0].y;
 	}
     } 
 
@@ -2223,7 +2235,7 @@
     return Success;
 }
 
-#endif
+#endif /* XINERAMA */
 
 
 int
@@ -2238,8 +2250,8 @@
 
     REQUEST_SIZE_MATCH(xWarpPointerReq);
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension)
+#ifdef XINERAMA
+    if(!noXineramaExtension)
 	return XineramaWarpPointer(client);
 #endif
 
@@ -2316,17 +2328,18 @@
     return Success;
 }
 
+#ifndef NO_XINERAMA_PORT
 static Bool 
 BorderSizeNotEmpty(WindowPtr pWin)
 {
      if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
 	return TRUE;
 
-#ifdef PANORAMIX
-     if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
+#ifdef XINERAMA
+     if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
 	int i;
 
-	for(i = 1; i < PanoramiXNumScreens; i++) {
+	for(i = 1; i < XineramaNumScreens; i++) {
 	    if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
 		return TRUE;
 	}
@@ -2334,6 +2347,7 @@
 #endif
      return FALSE;
 }
+#endif /* NO_XINERAMA_PORT */
 
 /* "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a
 	passive grab set on the window to be activated. */
@@ -2389,7 +2403,12 @@
 	if (GrabMatchesSecond(&tempGrab, grab) &&
 	    (!grab->confineTo ||
 	     (grab->confineTo->realized && 
-				BorderSizeNotEmpty(grab->confineTo))))
+#ifndef NO_XINERAMA_PORT
+		BorderSizeNotEmpty(grab->confineTo))))
+#else
+		REGION_NOTEMPTY( grab->confineTo->drawable.pScreen,
+		  &grab->confineTo->borderSize)))) 
+#endif
 	{
 #ifdef XCSECURITY
 	    if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE))
@@ -3331,8 +3350,8 @@
 		FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer,
 			       TRUE);
 	    /* Notify all the roots */
-#ifdef PANORAMIX
- 	    if ( !noPanoramiXExtension )
+#ifdef XINERAMA
+ 	    if ( !noXineramaExtension )
 	        FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
 	    else 
 #endif
@@ -3350,8 +3369,8 @@
 			   NotifyNonlinearVirtual, FALSE);
 	}
 	/* Notify all the roots */
-#ifdef PANORAMIX
-	if ( !noPanoramiXExtension )
+#ifdef XINERAMA
+	if ( !noXineramaExtension )
 	    FocusEvent(dev, FocusIn, mode, in, WindowTable[0]);
 	else 
 #endif
@@ -3368,8 +3387,8 @@
 	    if (fromWin == PointerRootWin)
 		FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer,
 			       TRUE);
-#ifdef PANORAMIX
- 	    if ( !noPanoramiXExtension )
+#ifdef XINERAMA
+ 	    if ( !noXineramaExtension )
 	        FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
 	    else 
 #endif
@@ -3882,13 +3901,13 @@
 	rep.winY = 0;
     }
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension) {
-	rep.rootX += panoramiXdataPtr[0].x;
-	rep.rootY += panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+    if(!noXineramaExtension) {
+	rep.rootX += xineramaDataPtr[0].x;
+	rep.rootY += xineramaDataPtr[0].y;
 	if(stuff->id == rep.root) {
-	    rep.winX += panoramiXdataPtr[0].x;
-	    rep.winY += panoramiXdataPtr[0].y;
+	    rep.winX += xineramaDataPtr[0].x;
+	    rep.winY += xineramaDataPtr[0].y;
 	}
     }
 #endif
@@ -4350,8 +4369,8 @@
     GrabPtr grab = inputInfo.pointer->grab;
     WindowPtr confineTo;
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return;
+#ifdef XINERAMA
+    if(!noXineramaExtension && pWin->drawable.pScreen->myNum) return;
 #endif
 
     if (grab && (confineTo = grab->confineTo))
@@ -4410,8 +4429,8 @@
     for (nscr = 0; nscr < screenInfo.numScreens; nscr++)
     {
 	pscr = screenInfo.screens[nscr];
-#ifdef PANORAMIX
-	if(!noPanoramiXExtension)
+#ifdef XINERAMA
+	if(!noXineramaExtension)
 	    displayed = (pscr == sprite.screen);
 	else
 #endif
@@ -4428,7 +4447,7 @@
     int		count;
     xEvent	*events;
 {
-#ifdef PANORAMIX
+#ifdef XINERAMA
     xEvent    eventCopy;
 #endif
     xEvent    eventTo, *eventFrom;
@@ -4439,9 +4458,9 @@
 	return;
 #endif
 
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && 
-       (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y)) 
+#ifdef XINERAMA
+    if(!noXineramaExtension && 
+       (xineramaDataPtr[0].x || xineramaDataPtr[0].y)) 
     {
 	switch(events->u.u.type) {
 	case MotionNotify:
@@ -4458,13 +4477,13 @@
         */
 	    count = 1;  /* should always be 1 */
 	    memcpy(&eventCopy, events, sizeof(xEvent));
-	    eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x;
-	    eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y;
+	    eventCopy.u.keyButtonPointer.rootX += xineramaDataPtr[0].x;
+	    eventCopy.u.keyButtonPointer.rootY += xineramaDataPtr[0].y;
 	    if(eventCopy.u.keyButtonPointer.event == 
 	       eventCopy.u.keyButtonPointer.root) 
 	    {
-		eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x;
-		eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y;
+		eventCopy.u.keyButtonPointer.eventX += xineramaDataPtr[0].x;
+		eventCopy.u.keyButtonPointer.eventY += xineramaDataPtr[0].y;
 	    }
 	    events = &eventCopy;
 	    break;

Index: main.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- main.c	29 Nov 2003 15:22:41 -0000	1.1.4.3
+++ main.c	18 Dec 2003 19:29:12 -0000	1.1.4.4
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $XFree86: xc/programs/Xserver/dix/main.c,v 3.44 2003/11/17 22:20:34 dawes Exp $ */
 /***********************************************************
 
@@ -47,7 +48,7 @@
 ******************************************************************/
 /* $Xorg: main.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
 
-/* The panoramix components contained the following notice */
+/* The Xinerama components contained the following notice */
 /****************************************************************
 *                                                               *
 *    Copyright (c) Digital Equipment Corporation, 1991, 1997    *
@@ -92,8 +93,8 @@
 #include "site.h"
 #include "dixfont.h"
 #include "extnsionst.h"
-#ifdef PANORAMIX
-#include "panoramiXsrv.h"
+#ifdef XINERAMA
+extern Bool noXineramaExtension;
 #else
 #include "dixevents.h"		/* InitEvents() */
 #include "dispatch.h"		/* InitProcVectors() */
@@ -122,7 +123,7 @@
 extern void InitProcVectors(void);
 extern Bool CreateGCperDepthArray(void);
 
-#ifndef PANORAMIX
+#ifndef XINERAMA
 static
 #endif
 Bool CreateConnectionBlock(void);
@@ -402,12 +403,12 @@
      	    DPMSEnabled = FALSE;
 #endif
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 	/*
 	 * Consolidate window and colourmap information for each screen
 	 */
-	if (!noPanoramiXExtension)
-	    PanoramiXConsolidate();
+	if (!noXineramaExtension)
+	    XineramaConsolidate();
 #endif
 
 	for (i = 0; i < screenInfo.numScreens; i++)
@@ -418,9 +419,9 @@
 	SetDPMSTimers();
 #endif
 
-#ifdef PANORAMIX
-	if (!noPanoramiXExtension) {
-	    if (!PanoramiXCreateConnectionBlock())
+#ifdef XINERAMA
+	if (!noXineramaExtension) {
+	    if (!XineramaCreateConnectionBlock())
 		FatalError("could not create connection block info");
 	} else
 #endif
@@ -437,12 +438,12 @@
 	FreeScreenSaverTimer();
 	CloseDownExtensions();
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 	{
-	    Bool remember_it = noPanoramiXExtension;
-	    noPanoramiXExtension = TRUE;
+	    Bool remember_it = noXineramaExtension;
+	    noXineramaExtension = TRUE;
 	    FreeAllResources();
-	    noPanoramiXExtension = remember_it;
+	    noXineramaExtension = remember_it;
 	}
 #else
 	FreeAllResources();
@@ -492,7 +493,7 @@
 
 static int padlength[4] = {0, 3, 2, 1};
 
-#ifndef PANORAMIX
+#ifndef XINERAMA
 static
 #endif
 Bool

Index: resource.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/resource.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- resource.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ resource.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /************************************************************
 
 Copyright 1987, 1998  The Open Group
@@ -88,9 +89,9 @@
 #include "dixevents.h"
 #include "dixgrabs.h"
 #include "cursor.h"
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
+#ifdef XINERAMA
+#include "xinerama.h"
+#include "xineramaSrv.h"
 #endif
 #include <assert.h>
 
@@ -672,7 +673,7 @@
     }
 }
 
-
+#ifndef NO_XINERAMA_PORT
 pointer
 LookupClientResourceComplex(
     ClientPtr client,
@@ -698,7 +699,7 @@
     }
     return NULL;
 }
-
+#endif /* NO_XINERAMA_PORT */
 
 void
 FreeClientNeverRetainResources(ClientPtr client)
@@ -797,17 +798,17 @@
     register ClientPtr client;
 {
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
     XID 	minid, maxid;
 
-	if (!noPanoramiXExtension) { 
+	if (!noXineramaExtension) { 
 	    minid = client->clientAsMask | (client->index ? 
 			                    SERVER_BIT : SERVER_MINID);
 	    maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1;
             if ((id >= minid) && (id <= maxid))
 	        return TRUE;
 	}
-#endif /* PANORAMIX */
+#endif /* XINERAMA */
 	return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) &&
 	    ((clientTable[client->index].expectID <= id) ||
 	     !LookupIDByClass(id, RC_ANY)));

Index: window.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/window.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- window.c	26 Nov 2003 22:48:43 -0000	1.1.4.2
+++ window.c	18 Dec 2003 19:29:12 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */
 /*
 
@@ -48,7 +49,7 @@
 
 */
 
-/* The panoramix components contained the following notice */
+/* The Xinerama components contained the following notice */
 /****************************************************************
 *                                                               *
 *    Copyright (c) Digital Equipment Corporation, 1991, 1997    *
@@ -85,9 +86,9 @@
 #include "dixstruct.h"
 #include "gcstruct.h"
 #include "servermd.h"
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
+#ifdef XINERAMA
+#include "xinerama.h"
+#include "xineramaSrv.h"
 #endif
 #include "dixevents.h"
 #include "globals.h"
@@ -2320,10 +2321,10 @@
 	    event.u.u.detail = Above;
 	event.u.configureRequest.x = x;
 	event.u.configureRequest.y = y;
-#ifdef PANORAMIX
-	if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
-            event.u.configureRequest.x += panoramiXdataPtr[0].x;
-            event.u.configureRequest.y += panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+	if(!noXineramaExtension && (!pParent || !pParent->parent)) {
+            event.u.configureRequest.x += xineramaDataPtr[0].x;
+            event.u.configureRequest.y += xineramaDataPtr[0].y;
 	}
 #endif
 	event.u.configureRequest.width = w;
@@ -2406,10 +2407,10 @@
 	    event.u.configureNotify.aboveSibling = None;
 	event.u.configureNotify.x = x;
 	event.u.configureNotify.y = y;
-#ifdef PANORAMIX
-	if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
-	    event.u.configureNotify.x += panoramiXdataPtr[0].x;
-            event.u.configureNotify.y += panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+	if(!noXineramaExtension && (!pParent || !pParent->parent)) {
+	    event.u.configureNotify.x += xineramaDataPtr[0].x;
+            event.u.configureNotify.y += xineramaDataPtr[0].y;
 	}
 #endif
 	event.u.configureNotify.width = w;
@@ -2564,10 +2565,10 @@
     event.u.reparent.parent = pParent->drawable.id;
     event.u.reparent.x = x;
     event.u.reparent.y = y;
-#ifdef PANORAMIX
-    if(!noPanoramiXExtension && !pParent->parent) {
-	event.u.reparent.x += panoramiXdataPtr[0].x;
-	event.u.reparent.y += panoramiXdataPtr[0].y;
+#ifdef XINERAMA
+    if(!noXineramaExtension && !pParent->parent) {
+	event.u.reparent.x += xineramaDataPtr[0].x;
+	event.u.reparent.y += xineramaDataPtr[0].y;
     }
 #endif
     event.u.reparent.override = pWin->overrideRedirect;
@@ -2937,10 +2938,10 @@
 	{
 	    pChild->realized = FALSE;
 	    pChild->visibility = VisibilityNotViewable;
-#ifdef PANORAMIX
-	    if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) {
-		PanoramiXRes *win;
-		win = (PanoramiXRes*)LookupIDByType(pChild->drawable.id,
+#ifdef XINERAMA
+	    if(!noXineramaExtension && !pChild->drawable.pScreen->myNum) {
+		XineramaRes *win;
+		win = (XineramaRes*)LookupIDByType(pChild->drawable.id,
 							XRT_WINDOW);
 		if(win)
 		   win->u.win.visibility = VisibilityNotViewable;
@@ -3219,25 +3220,26 @@
     WindowPtr pWin;
 {
     xEvent event;
+#ifndef NO_XINERAMA_PORT
     unsigned int visibility = pWin->visibility;
-
-#ifdef PANORAMIX
+#endif
+#ifdef XINERAMA
     /* This is not quite correct yet, but it's close */
-    if(!noPanoramiXExtension) {
-	PanoramiXRes *win;
+    if(!noXineramaExtension) {
+	XineramaRes *win;
 	WindowPtr pWin2;
 	int i, Scrnum;
 
 	Scrnum = pWin->drawable.pScreen->myNum;
 	
-	win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum);
+	win = XineramaFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum);
 
 	if(!win || (win->u.win.visibility == visibility))
 	    return;
 
 	switch(visibility) {
 	case VisibilityUnobscured:
-	    for(i = 0; i < PanoramiXNumScreens; i++) {
+	    for(i = 0; i < XineramaNumScreens; i++) {
 		if(i == Scrnum) continue;
 
 		pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
@@ -3257,7 +3259,7 @@
 	    }
 	    break;
 	case VisibilityFullyObscured:
-	    for(i = 0; i < PanoramiXNumScreens; i++) {
+	    for(i = 0; i < XineramaNumScreens; i++) {
 		if(i == Scrnum) continue;
 
 		pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
@@ -3275,7 +3277,6 @@
 	win->u.win.visibility = visibility;
     }
 #endif
-
     event.u.u.type = VisibilityNotify;
     event.u.visibility.window = pWin->drawable.id;
     event.u.visibility.state = visibility;





More information about the xorg-commit mailing list