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.
This commit is contained in:
Kaleb Keithley 2003-12-18 19:32:17 +00:00
parent 8a7481a274
commit 4b75c7f635
48 changed files with 776 additions and 1101 deletions

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.7 2003/10/28 22:52:10 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.7 2003/10/28 22:52:10 tsi Exp $ */
/***************************************************************************** /*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
@ -76,9 +77,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/xtrapddmi.h> #include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h> #include <X11/extensions/xtrapproto.h>
#include "colormapst.h" #include "colormapst.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#include "cursor.h" #include "cursor.h"
#endif #endif
@ -1558,8 +1559,8 @@ void XETrapStampAndMail(xEvent *x_event)
/* Copy the event information into our local memory */ /* Copy the event information into our local memory */
(void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); (void)memcpy(&(data.u.event),x_event,sizeof(xEvent));
#ifdef PANORAMIX #ifdef XINERAMA
if (!noPanoramiXExtension && if (!noXineramaExtension &&
(data.u.event.u.u.type == MotionNotify || (data.u.event.u.u.type == MotionNotify ||
data.u.event.u.u.type == ButtonPress || data.u.event.u.u.type == ButtonPress ||
data.u.event.u.u.type == ButtonRelease || data.u.event.u.u.type == ButtonRelease ||
@ -1567,9 +1568,9 @@ void XETrapStampAndMail(xEvent *x_event)
data.u.event.u.u.type == KeyRelease)) { data.u.event.u.u.type == KeyRelease)) {
int scr = XineramaGetCursorScreen(); int scr = XineramaGetCursorScreen();
data.u.event.u.keyButtonPointer.rootX += data.u.event.u.keyButtonPointer.rootX +=
panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; xineramaDataPtr[scr].x - xineramaDataPtr[0].x;
data.u.event.u.keyButtonPointer.rootY += data.u.event.u.keyButtonPointer.rootY +=
panoramiXdataPtr[scr].y - panoramiXdataPtr[0].y; xineramaDataPtr[scr].y - xineramaDataPtr[0].y;
} }
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $ * $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
* *
@ -46,9 +47,9 @@ in this Software without prior written authorization from the X Consortium.
#include "gcstruct.h" #include "gcstruct.h"
#include "cursorstr.h" #include "cursorstr.h"
#include "colormapst.h" #include "colormapst.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
@ -676,8 +677,8 @@ ScreenSaverHandle (pScreen, xstate, force)
ret = TRUE; ret = TRUE;
} }
#ifdef PANORAMIX #ifdef XINERAMA
if(noPanoramiXExtension || !pScreen->myNum) if(noXineramaExtension || !pScreen->myNum)
#endif #endif
SendScreenSaverNotify (pScreen, state, force); SendScreenSaverNotify (pScreen, state, force);
return ret; return ret;
@ -1194,20 +1195,20 @@ ScreenSaverUnsetAttributes (ClientPtr client)
static int static int
ProcScreenSaverSetAttributes (ClientPtr client) ProcScreenSaverSetAttributes (ClientPtr client)
{ {
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
REQUEST(xScreenSaverSetAttributesReq); REQUEST(xScreenSaverSetAttributesReq);
PanoramiXRes *draw; XineramaRes *draw;
PanoramiXRes *backPix = NULL; XineramaRes *backPix = NULL;
PanoramiXRes *bordPix = NULL; XineramaRes *bordPix = NULL;
PanoramiXRes *cmap = NULL; XineramaRes *cmap = NULL;
int i, status = 0, len; int i, status = 0, len;
int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; int pback_offset = 0, pbord_offset = 0, cmap_offset = 0;
XID orig_visual, tmp; XID orig_visual, tmp;
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
@ -1219,7 +1220,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1)); pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pback_offset); tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) { if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( if(!(backPix = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess))) client, tmp, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap; return BadPixmap;
} }
@ -1229,7 +1230,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1)); pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pbord_offset); tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) { if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( if(!(bordPix = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess))) client, tmp, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap; return BadPixmap;
} }
@ -1239,7 +1240,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1)); cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1));
tmp = *((CARD32 *) &stuff[1] + cmap_offset); tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) { if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( if(!(cmap = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess))) client, tmp, XRT_COLORMAP, SecurityReadAccess)))
return BadColor; return BadColor;
} }
@ -1258,7 +1259,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
if (orig_visual != CopyFromParent) if (orig_visual != CopyFromParent)
stuff->visualID = stuff->visualID =
PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i]; XineramaVisualTable[(orig_visual*MAXSCREENS) + i];
status = ScreenSaverSetAttributes(client); status = ScreenSaverSetAttributes(client);
} }
@ -1273,17 +1274,17 @@ ProcScreenSaverSetAttributes (ClientPtr client)
static int static int
ProcScreenSaverUnsetAttributes (ClientPtr client) ProcScreenSaverUnsetAttributes (ClientPtr client)
{ {
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
REQUEST(xScreenSaverUnsetAttributesReq); REQUEST(xScreenSaverUnsetAttributesReq);
PanoramiXRes *draw; XineramaRes *draw;
int i; int i;
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
for(i = PanoramiXNumScreens - 1; i > 0; i--) { for(i = XineramaNumScreens - 1; i > 0; i--) {
stuff->drawable = draw->info[i].id; stuff->drawable = draw->info[i].id;
ScreenSaverUnsetAttributes(client); ScreenSaverUnsetAttributes(client);
} }

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/Xext/shape.c,v 3.19 2003/11/17 22:20:26 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.19 2003/11/17 22:20:26 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.19 2003/11/17 22:20:26 dawes Exp $ */
/************************************************************ /************************************************************
@ -112,9 +113,9 @@ static DISPATCH_PROC(SProcShapeQueryVersion);
static DISPATCH_PROC(SProcShapeRectangles); static DISPATCH_PROC(SProcShapeRectangles);
static DISPATCH_PROC(SProcShapeSelectInput); static DISPATCH_PROC(SProcShapeSelectInput);
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#if 0 #if 0
@ -375,18 +376,18 @@ ProcShapeRectangles (client)
stuff->xOff, stuff->yOff, createDefault); stuff->xOff, stuff->yOff, createDefault);
} }
#ifdef PANORAMIX #ifdef XINERAMA
static int static int
ProcPanoramiXShapeRectangles( ProcXineramaShapeRectangles(
register ClientPtr client) register ClientPtr client)
{ {
REQUEST(xShapeRectanglesReq); REQUEST(xShapeRectanglesReq);
PanoramiXRes *win; XineramaRes *win;
int j, result = 0; int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow; return BadWindow;
@ -464,23 +465,23 @@ ProcShapeMask (client)
stuff->xOff, stuff->yOff, createDefault); stuff->xOff, stuff->yOff, createDefault);
} }
#ifdef PANORAMIX #ifdef XINERAMA
static int static int
ProcPanoramiXShapeMask( ProcXineramaShapeMask(
register ClientPtr client) register ClientPtr client)
{ {
REQUEST(xShapeMaskReq); REQUEST(xShapeMaskReq);
PanoramiXRes *win, *pmap; XineramaRes *win, *pmap;
int j, result = 0; int j, result = 0;
REQUEST_SIZE_MATCH (xShapeMaskReq); REQUEST_SIZE_MATCH (xShapeMaskReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow; return BadWindow;
if(stuff->src != None) { if(stuff->src != None) {
if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType( if(!(pmap = (XineramaRes *)SecurityLookupIDByType(
client, stuff->src, XRT_PIXMAP, SecurityReadAccess))) client, stuff->src, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap; return BadPixmap;
} else } else
@ -579,22 +580,22 @@ ProcShapeCombine (client)
} }
#ifdef PANORAMIX #ifdef XINERAMA
static int static int
ProcPanoramiXShapeCombine( ProcXineramaShapeCombine(
register ClientPtr client) register ClientPtr client)
{ {
REQUEST(xShapeCombineReq); REQUEST(xShapeCombineReq);
PanoramiXRes *win, *win2; XineramaRes *win, *win2;
int j, result = 0; int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeCombineReq); REQUEST_AT_LEAST_SIZE (xShapeCombineReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow; return BadWindow;
if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType( if(!(win2 = (XineramaRes *)SecurityLookupIDByType(
client, stuff->src, XRT_WINDOW, SecurityReadAccess))) client, stuff->src, XRT_WINDOW, SecurityReadAccess)))
return BadWindow; return BadWindow;
@ -648,18 +649,18 @@ ProcShapeOffset (client)
} }
#ifdef PANORAMIX #ifdef XINERAMA
static int static int
ProcPanoramiXShapeOffset( ProcXineramaShapeOffset(
register ClientPtr client) register ClientPtr client)
{ {
REQUEST(xShapeOffsetReq); REQUEST(xShapeOffsetReq);
PanoramiXRes *win; XineramaRes *win;
int j, result = 0; int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); REQUEST_AT_LEAST_SIZE (xShapeOffsetReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow; return BadWindow;
@ -1064,30 +1065,30 @@ ProcShapeDispatch (client)
case X_ShapeQueryVersion: case X_ShapeQueryVersion:
return ProcShapeQueryVersion (client); return ProcShapeQueryVersion (client);
case X_ShapeRectangles: case X_ShapeRectangles:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShapeRectangles (client); return ProcXineramaShapeRectangles (client);
else else
#endif #endif
return ProcShapeRectangles (client); return ProcShapeRectangles (client);
case X_ShapeMask: case X_ShapeMask:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShapeMask (client); return ProcXineramaShapeMask (client);
else else
#endif #endif
return ProcShapeMask (client); return ProcShapeMask (client);
case X_ShapeCombine: case X_ShapeCombine:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShapeCombine (client); return ProcXineramaShapeCombine (client);
else else
#endif #endif
return ProcShapeCombine (client); return ProcShapeCombine (client);
case X_ShapeOffset: case X_ShapeOffset:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShapeOffset (client); return ProcXineramaShapeOffset (client);
else else
#endif #endif
return ProcShapeOffset (client); return ProcShapeOffset (client);

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/Xext/shm.c,v 3.40 2003/11/17 22:20:27 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.40 2003/11/17 22:20:27 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.40 2003/11/17 22:20:27 dawes Exp $ */
/************************************************************ /************************************************************
@ -62,9 +63,9 @@ in this Software without prior written authorization from The Open Group.
#include "xf86_ansic.h" #include "xf86_ansic.h"
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#include "modinit.h" #include "modinit.h"
@ -560,26 +561,27 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
} }
#ifdef PANORAMIX #ifdef XINERAMA
static int static int
ProcPanoramiXShmPutImage(register ClientPtr client) ProcXineramaShmPutImage(register ClientPtr client)
{ {
int j, result = 0, orig_x, orig_y; int j, result = 0, orig_x, orig_y;
PanoramiXRes *draw, *gc; XineramaRes *draw, *gc;
Bool sendEvent, isRoot; Bool sendEvent, isRoot;
REQUEST(xShmPutImageReq); REQUEST(xShmPutImageReq);
REQUEST_SIZE_MATCH(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC; return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
orig_x = stuff->dstX; orig_x = stuff->dstX;
orig_y = stuff->dstY; orig_y = stuff->dstY;
@ -590,8 +592,8 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
stuff->drawable = draw->info[j].id; stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id; stuff->gc = gc->info[j].id;
if (isRoot) { if (isRoot) {
stuff->dstX = orig_x - panoramiXdataPtr[j].x; stuff->dstX = orig_x - xineramaDataPtr[j].x;
stuff->dstY = orig_y - panoramiXdataPtr[j].y; stuff->dstY = orig_y - xineramaDataPtr[j].y;
} }
result = ProcShmPutImage(client); result = ProcShmPutImage(client);
if(result != client->noClientException) break; if(result != client->noClientException) break;
@ -600,9 +602,9 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
} }
static int static int
ProcPanoramiXShmGetImage(ClientPtr client) ProcXineramaShmGetImage(ClientPtr client)
{ {
PanoramiXRes *draw; XineramaRes *draw;
DrawablePtr drawables[MAXSCREENS]; DrawablePtr drawables[MAXSCREENS];
DrawablePtr pDraw; DrawablePtr pDraw;
xShmGetImageReply xgi; xShmGetImageReply xgi;
@ -621,7 +623,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return(BadValue); return(BadValue);
} }
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
@ -639,19 +641,20 @@ ProcPanoramiXShmGetImage(ClientPtr client)
format = stuff->format; format = stuff->format;
planemask = stuff->planeMask; planemask = stuff->planeMask;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
if(isRoot) { if(isRoot) {
if( /* check for being onscreen */ if( /* check for being onscreen */
x < 0 || x + w > PanoramiXPixWidth || x < 0 || x + w > XineramaPixWidth ||
y < 0 || y + h > PanoramiXPixHeight ) y < 0 || y + h > XineramaPixHeight )
return(BadMatch); return(BadMatch);
} else { } else {
if( /* check for being onscreen */ if( /* check for being onscreen */
panoramiXdataPtr[0].x + pDraw->x + x < 0 || xineramaDataPtr[0].x + pDraw->x + x < 0 ||
panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth || xineramaDataPtr[0].x + pDraw->x + x + w > XineramaPixWidth ||
panoramiXdataPtr[0].y + pDraw->y + y < 0 || xineramaDataPtr[0].y + pDraw->y + y < 0 ||
panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight || xineramaDataPtr[0].y + pDraw->y + y + h > XineramaPixHeight ||
/* check for being inside of border */ /* check for being inside of border */
x < - wBorderWidth((WindowPtr)pDraw) || x < - wBorderWidth((WindowPtr)pDraw) ||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
@ -661,7 +664,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
} }
drawables[0] = pDraw; drawables[0] = pDraw;
for(i = 1; i < PanoramiXNumScreens; i++) for(i = 1; i < XineramaNumScreens; i++)
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client); VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
xgi.visual = wVisual(((WindowPtr)pDraw)); xgi.visual = wVisual(((WindowPtr)pDraw));
@ -714,7 +717,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
} }
static int static int
ProcPanoramiXShmCreatePixmap( ProcXineramaShmCreatePixmap(
register ClientPtr client) register ClientPtr client)
{ {
ScreenPtr pScreen = NULL; ScreenPtr pScreen = NULL;
@ -724,7 +727,7 @@ ProcPanoramiXShmCreatePixmap(
int i, j, result; int i, j, result;
ShmDescPtr shmdesc; ShmDescPtr shmdesc;
REQUEST(xShmCreatePixmapReq); REQUEST(xShmCreatePixmapReq);
PanoramiXRes *newPix; XineramaRes *newPix;
REQUEST_SIZE_MATCH(xShmCreatePixmapReq); REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
client->errorValue = stuff->pid; client->errorValue = stuff->pid;
@ -752,13 +755,13 @@ CreatePmap:
PixmapBytePad(stuff->width, stuff->depth) * stuff->height, PixmapBytePad(stuff->width, stuff->depth) * stuff->height,
client); client);
if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) if(!(newPix = (XineramaRes *) xalloc(sizeof(XineramaRes))))
return BadAlloc; return BadAlloc;
newPix->type = XRT_PIXMAP; newPix->type = XRT_PIXMAP;
newPix->u.pix.shared = TRUE; newPix->u.pix.shared = TRUE;
newPix->info[0].id = stuff->pid; newPix->info[0].id = stuff->pid;
for(j = 1; j < PanoramiXNumScreens; j++) for(j = 1; j < XineramaNumScreens; j++)
newPix->info[j].id = FakeClientID(client->index); newPix->info[j].id = FakeClientID(client->index);
result = (client->noClientException); result = (client->noClientException);
@ -1080,8 +1083,10 @@ CreatePmap:
shmdesc->addr + stuff->offset); shmdesc->addr + stuff->offset);
if (pMap) if (pMap)
{ {
#ifdef NO_XINERAMA_PORT
#ifdef PIXPRIV #ifdef PIXPRIV
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
#endif
#endif #endif
shmdesc->refcnt++; shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@ -1108,21 +1113,21 @@ ProcShmDispatch (client)
case X_ShmDetach: case X_ShmDetach:
return ProcShmDetach(client); return ProcShmDetach(client);
case X_ShmPutImage: case X_ShmPutImage:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShmPutImage(client); return ProcXineramaShmPutImage(client);
#endif #endif
return ProcShmPutImage(client); return ProcShmPutImage(client);
case X_ShmGetImage: case X_ShmGetImage:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShmGetImage(client); return ProcXineramaShmGetImage(client);
#endif #endif
return ProcShmGetImage(client); return ProcShmGetImage(client);
case X_ShmCreatePixmap: case X_ShmCreatePixmap:
#ifdef PANORAMIX #ifdef XINERAMA
if ( !noPanoramiXExtension ) if ( !noXineramaExtension )
return ProcPanoramiXShmCreatePixmap(client); return ProcXineramaShmCreatePixmap(client);
#endif #endif
return ProcShmCreatePixmap(client); return ProcShmCreatePixmap(client);
default: default:

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
/* /*
@ -63,9 +64,9 @@ static unsigned char XTestReqCode;
extern int DeviceValuator; extern int DeviceValuator;
#endif /* XINPUT */ #endif /* XINPUT */
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
static void XTestResetProc( static void XTestResetProc(
@ -390,13 +391,13 @@ ProcXTestFakeInput(client)
return BadValue; return BadValue;
} }
#ifdef PANORAMIX #ifdef XINERAMA
if (!noPanoramiXExtension) { if (!noXineramaExtension) {
ScreenPtr pScreen = root->drawable.pScreen; ScreenPtr pScreen = root->drawable.pScreen;
BoxRec box; BoxRec box;
int i; int i;
int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x; int x = ev->u.keyButtonPointer.rootX + xineramaDataPtr[0].x;
int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y; int y = ev->u.keyButtonPointer.rootY + xineramaDataPtr[0].y;
if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
x, y, &box)) { x, y, &box)) {
FOR_NSCREENS(i) { FOR_NSCREENS(i) {
@ -405,8 +406,8 @@ ProcXTestFakeInput(client)
&XineramaScreenRegions[i], &XineramaScreenRegions[i],
x, y, &box)) { x, y, &box)) {
root = WindowTable[i]; root = WindowTable[i];
x -= panoramiXdataPtr[i].x; x -= xineramaDataPtr[i].x;
y -= panoramiXdataPtr[i].y; y -= xineramaDataPtr[i].y;
ev->u.keyButtonPointer.rootX = x; ev->u.keyButtonPointer.rootX = x;
ev->u.keyButtonPointer.rootY = y; ev->u.keyButtonPointer.rootY = y;
break; break;
@ -425,10 +426,10 @@ ProcXTestFakeInput(client)
else if (ev->u.keyButtonPointer.rootY >= root->drawable.height) else if (ev->u.keyButtonPointer.rootY >= root->drawable.height)
ev->u.keyButtonPointer.rootY = root->drawable.height - 1; ev->u.keyButtonPointer.rootY = root->drawable.height - 1;
#ifdef PANORAMIX #ifdef XINERAMA
if ((!noPanoramiXExtension if ((!noXineramaExtension
&& root->drawable.pScreen->myNum != XineramaGetCursorScreen()) && root->drawable.pScreen->myNum != XineramaGetCursorScreen())
|| (noPanoramiXExtension && root != GetCurrentRootWindow())) || (noXineramaExtension && root != GetCurrentRootWindow()))
#else #else
if (root != GetCurrentRootWindow()) if (root != GetCurrentRootWindow())

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/*********************************************************** /***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
@ -72,9 +73,9 @@ SOFTWARE.
#include "xvdisp.h" #include "xvdisp.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
unsigned long XvXRTPort; unsigned long XvXRTPort;
@ -232,15 +233,15 @@ ProcXvDispatch(ClientPtr client)
case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client));
case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); case xv_QueryEncodings: return(ProcXvQueryEncodings(client));
case xv_PutVideo: case xv_PutVideo:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvPutVideo(client)); return(XineramaXvPutVideo(client));
else else
#endif #endif
return(ProcXvPutVideo(client)); return(ProcXvPutVideo(client));
case xv_PutStill: case xv_PutStill:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvPutStill(client)); return(XineramaXvPutStill(client));
else else
#endif #endif
@ -252,15 +253,15 @@ ProcXvDispatch(ClientPtr client)
case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client)); case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client));
case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client)); case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client));
case xv_StopVideo: case xv_StopVideo:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvStopVideo(client)); return(XineramaXvStopVideo(client));
else else
#endif #endif
return(ProcXvStopVideo(client)); return(ProcXvStopVideo(client));
case xv_SetPortAttribute: case xv_SetPortAttribute:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvSetPortAttribute(client)); return(XineramaXvSetPortAttribute(client));
else else
#endif #endif
@ -269,16 +270,16 @@ ProcXvDispatch(ClientPtr client)
case xv_QueryBestSize: return(ProcXvQueryBestSize(client)); case xv_QueryBestSize: return(ProcXvQueryBestSize(client));
case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client)); case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client));
case xv_PutImage: case xv_PutImage:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvPutImage(client)); return(XineramaXvPutImage(client));
else else
#endif #endif
return(ProcXvPutImage(client)); return(ProcXvPutImage(client));
#ifdef MITSHM #ifdef MITSHM
case xv_ShmPutImage: case xv_ShmPutImage:
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
return(XineramaXvShmPutImage(client)); return(XineramaXvShmPutImage(client));
else else
#endif #endif
@ -1862,7 +1863,7 @@ SWriteListImageFormatsReply(
} }
#ifdef PANORAMIX #ifdef XINERAMA
@ -1871,15 +1872,15 @@ static int
XineramaXvStopVideo(ClientPtr client) XineramaXvStopVideo(ClientPtr client)
{ {
int result = Success, i; int result = Success, i;
PanoramiXRes *draw, *port; XineramaRes *draw, *port;
REQUEST(xvStopVideoReq); REQUEST(xvStopVideoReq);
REQUEST_SIZE_MATCH(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
@ -1898,12 +1899,12 @@ static int
XineramaXvSetPortAttribute(ClientPtr client) XineramaXvSetPortAttribute(ClientPtr client)
{ {
REQUEST(xvSetPortAttributeReq); REQUEST(xvSetPortAttributeReq);
PanoramiXRes *port; XineramaRes *port;
int result = Success, i; int result = Success, i;
REQUEST_SIZE_MATCH(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
@ -1922,26 +1923,27 @@ static int
XineramaXvShmPutImage(ClientPtr client) XineramaXvShmPutImage(ClientPtr client)
{ {
REQUEST(xvShmPutImageReq); REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port; XineramaRes *draw, *gc, *port;
Bool send_event = stuff->send_event; Bool send_event = stuff->send_event;
Bool isRoot; Bool isRoot;
int result = Success, i, x, y; int result = Success, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
x = stuff->drw_x; x = stuff->drw_x;
y = stuff->drw_y; y = stuff->drw_y;
@ -1954,8 +1956,8 @@ XineramaXvShmPutImage(ClientPtr client)
stuff->drw_x = x; stuff->drw_x = x;
stuff->drw_y = y; stuff->drw_y = y;
if(isRoot) { if(isRoot) {
stuff->drw_x -= panoramiXdataPtr[i].x; stuff->drw_x -= xineramaDataPtr[i].x;
stuff->drw_y -= panoramiXdataPtr[i].y; stuff->drw_y -= xineramaDataPtr[i].y;
} }
stuff->send_event = (send_event && !i) ? 1 : 0; stuff->send_event = (send_event && !i) ? 1 : 0;
@ -1970,25 +1972,26 @@ static int
XineramaXvPutImage(ClientPtr client) XineramaXvPutImage(ClientPtr client)
{ {
REQUEST(xvPutImageReq); REQUEST(xvPutImageReq);
PanoramiXRes *draw, *gc, *port; XineramaRes *draw, *gc, *port;
Bool isRoot; Bool isRoot;
int result = Success, i, x, y; int result = Success, i, x, y;
REQUEST_AT_LEAST_SIZE(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
x = stuff->drw_x; x = stuff->drw_x;
y = stuff->drw_y; y = stuff->drw_y;
@ -2001,8 +2004,8 @@ XineramaXvPutImage(ClientPtr client)
stuff->drw_x = x; stuff->drw_x = x;
stuff->drw_y = y; stuff->drw_y = y;
if(isRoot) { if(isRoot) {
stuff->drw_x -= panoramiXdataPtr[i].x; stuff->drw_x -= xineramaDataPtr[i].x;
stuff->drw_y -= panoramiXdataPtr[i].y; stuff->drw_y -= xineramaDataPtr[i].y;
} }
result = ProcXvPutImage(client); result = ProcXvPutImage(client);
@ -2015,25 +2018,26 @@ static int
XineramaXvPutVideo(ClientPtr client) XineramaXvPutVideo(ClientPtr client)
{ {
REQUEST(xvPutImageReq); REQUEST(xvPutImageReq);
PanoramiXRes *draw, *gc, *port; XineramaRes *draw, *gc, *port;
Bool isRoot; Bool isRoot;
int result = Success, i, x, y; int result = Success, i, x, y;
REQUEST_AT_LEAST_SIZE(xvPutVideoReq); REQUEST_AT_LEAST_SIZE(xvPutVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
x = stuff->drw_x; x = stuff->drw_x;
y = stuff->drw_y; y = stuff->drw_y;
@ -2046,8 +2050,8 @@ XineramaXvPutVideo(ClientPtr client)
stuff->drw_x = x; stuff->drw_x = x;
stuff->drw_y = y; stuff->drw_y = y;
if(isRoot) { if(isRoot) {
stuff->drw_x -= panoramiXdataPtr[i].x; stuff->drw_x -= xineramaDataPtr[i].x;
stuff->drw_y -= panoramiXdataPtr[i].y; stuff->drw_y -= xineramaDataPtr[i].y;
} }
result = ProcXvPutVideo(client); result = ProcXvPutVideo(client);
@ -2060,25 +2064,26 @@ static int
XineramaXvPutStill(ClientPtr client) XineramaXvPutStill(ClientPtr client)
{ {
REQUEST(xvPutImageReq); REQUEST(xvPutImageReq);
PanoramiXRes *draw, *gc, *port; XineramaRes *draw, *gc, *port;
Bool isRoot; Bool isRoot;
int result = Success, i, x, y; int result = Success, i, x, y;
REQUEST_AT_LEAST_SIZE(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (XineramaRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
x = stuff->drw_x; x = stuff->drw_x;
y = stuff->drw_y; y = stuff->drw_y;
@ -2091,8 +2096,8 @@ XineramaXvPutStill(ClientPtr client)
stuff->drw_x = x; stuff->drw_x = x;
stuff->drw_y = y; stuff->drw_y = y;
if(isRoot) { if(isRoot) {
stuff->drw_x -= panoramiXdataPtr[i].x; stuff->drw_x -= xineramaDataPtr[i].x;
stuff->drw_y -= panoramiXdataPtr[i].y; stuff->drw_y -= xineramaDataPtr[i].y;
} }
result = ProcXvPutStill(client); result = ProcXvPutStill(client);
@ -2110,7 +2115,7 @@ void XineramifyXv(void)
XvAttributePtr pAttr; XvAttributePtr pAttr;
XvScreenPtr xvsp; XvScreenPtr xvsp;
Bool isOverlay, hasOverlay; Bool isOverlay, hasOverlay;
PanoramiXRes *port; XineramaRes *port;
XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; XvAdaptorPtr MatchingAdaptors[MAXSCREENS];
int i, j, k, l; int i, j, k, l;
@ -2136,7 +2141,7 @@ void XineramifyXv(void)
} }
} }
for(j = 1; j < PanoramiXNumScreens; j++) { for(j = 1; j < XineramaNumScreens; j++) {
pScreen = screenInfo.screens[j]; pScreen = screenInfo.screens[j];
xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr;
@ -2194,12 +2199,12 @@ void XineramifyXv(void)
/* now create a resource for each port */ /* now create a resource for each port */
for(j = 0; j < refAdapt->nPorts; j++) { for(j = 0; j < refAdapt->nPorts; j++) {
if(!(port = xalloc(sizeof(PanoramiXRes)))) if(!(port = xalloc(sizeof(XineramaRes))))
break; break;
port->info[0].id = MatchingAdaptors[0]->base_id + j; port->info[0].id = MatchingAdaptors[0]->base_id + j;
AddResource(port->info[0].id, XvXRTPort, port); AddResource(port->info[0].id, XvXRTPort, port);
for(k = 1; k < PanoramiXNumScreens; k++) { for(k = 1; k < XineramaNumScreens; k++) {
if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j))
port->info[k].id = MatchingAdaptors[k]->base_id + j; port->info[k].id = MatchingAdaptors[k]->base_id + j;
else else

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/*********************************************************** /***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
@ -98,9 +99,9 @@ SOFTWARE.
#include "xf86_ansic.h" #include "xf86_ansic.h"
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#include "xvdisp.h" #include "xvdisp.h"
#endif #endif
@ -171,7 +172,7 @@ XvExtensionInit()
ErrorF("XvExtensionInit: Unable to allocate screen private index\n"); ErrorF("XvExtensionInit: Unable to allocate screen private index\n");
return; return;
} }
#ifdef PANORAMIX #ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv); XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif #endif
XvScreenGeneration = serverGeneration; XvScreenGeneration = serverGeneration;
@ -270,7 +271,7 @@ XvScreenInit(ScreenPtr pScreen)
ErrorF("XvScreenInit: Unable to allocate screen private index\n"); ErrorF("XvScreenInit: Unable to allocate screen private index\n");
return BadAlloc; return BadAlloc;
} }
#ifdef PANORAMIX #ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv); XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif #endif
XvScreenGeneration = serverGeneration; XvScreenGeneration = serverGeneration;

View File

@ -1,3 +1,4 @@
/* $XdotOrg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */
/* $Xorg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /* $Xorg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */
/*********************************************************** /***********************************************************
@ -58,9 +59,11 @@ SOFTWARE.
#include "cfbmskbits.h" #include "cfbmskbits.h"
#include "mi.h" #include "mi.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
extern Bool noXineramaExtension;
extern WindowPtr *WindowTable;
#endif #endif
void void
@ -97,14 +100,16 @@ cfbPaintWindow(pWin, pRegion, what)
} }
else else
{ {
#ifndef NO_XINERAMA_PORT
int xorg = pWin->drawable.x; int xorg = pWin->drawable.x;
int yorg = pWin->drawable.y; int yorg = pWin->drawable.y;
#ifdef PANORAMIX #endif
if(!noPanoramiXExtension) { #ifdef XINERAMA
if(!noXineramaExtension) {
int index = pWin->drawable.pScreen->myNum; int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pWin) { if(WindowTable[index] == pWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif
@ -112,7 +117,11 @@ cfbPaintWindow(pWin, pRegion, what)
(int)REGION_NUM_RECTS(pRegion), (int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), REGION_RECTS(pRegion),
pWin->background.pixmap, pWin->background.pixmap,
#ifndef NO_XINERAMA_PORT
xorg, yorg); xorg, yorg);
#else
(int)pWin->drawable.x, (int)pWin->drawable.y);
#endif
} }
break; break;
case BackgroundPixel: case BackgroundPixel:
@ -140,21 +149,25 @@ cfbPaintWindow(pWin, pRegion, what)
} }
else else
{ {
#ifndef NO_XINERAMA_PORT
int xorg, yorg; int xorg, yorg;
#endif
for (pBgWin = pWin; for (pBgWin = pWin;
pBgWin->backgroundState == ParentRelative; pBgWin->backgroundState == ParentRelative;
pBgWin = pBgWin->parent); pBgWin = pBgWin->parent);
#ifndef NO_XINERAMA_PORT
xorg = pBgWin->drawable.x; xorg = pBgWin->drawable.x;
yorg = pBgWin->drawable.y; yorg = pBgWin->drawable.y;
#endif
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int index = pWin->drawable.pScreen->myNum; int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pBgWin) { if(WindowTable[index] == pBgWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif
@ -163,7 +176,12 @@ cfbPaintWindow(pWin, pRegion, what)
(int)REGION_NUM_RECTS(pRegion), (int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), REGION_RECTS(pRegion),
pWin->border.pixmap, pWin->border.pixmap,
#ifndef NO_XINERAMA_PORT
xorg, yorg); xorg, yorg);
#else
(int) pBgWin->drawable.x,
(int) pBgWin->drawable.y);
#endif
} }
break; break;
} }

View File

@ -1,3 +1,4 @@
/* $XdotOrg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */
/* $Xorg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /* $Xorg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */
/****************************************************************************** /******************************************************************************
* *
@ -1820,8 +1821,9 @@ DbeExtensionInit()
int nStubbedScreens = 0; int nStubbedScreens = 0;
Bool ddxInitSuccess; Bool ddxInitSuccess;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) return; extern Bool noXineramaExtension;
if(!noXineramaExtension) return;
#endif #endif
/* Allocate private pointers in windows and screens. */ /* Allocate private pointers in windows and screens. */

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.12 2003/11/17 22:20:33 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.12 2003/11/17 22:20:33 dawes Exp $ */
/*********************************************************** /***********************************************************
@ -61,6 +62,11 @@ SOFTWARE.
#ifdef LBX #ifdef LBX
#include "lbxserve.h" #include "lbxserve.h"
#endif #endif
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
extern Bool noXineramaExtension;
#endif
extern XID clientErrorValue; extern XID clientErrorValue;
extern int colormapPrivateCount; extern int colormapPrivateCount;
@ -474,16 +480,23 @@ TellNoMap (pwin, pmid)
if (wColormap(pwin) == *pmid) 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 */ /* This should be call to DeliverEvent */
xE.u.u.type = ColormapNotify; xE.u.u.type = ColormapNotify;
xE.u.colormap.window = pwin->drawable.id; xE.u.colormap.window = pwin->drawable.id;
xE.u.colormap.colormap = None; xE.u.colormap.colormap = None;
xE.u.colormap.new = TRUE; xE.u.colormap.new = TRUE;
xE.u.colormap.state = ColormapUninstalled; xE.u.colormap.state = ColormapUninstalled;
#ifdef PANORAMIX
if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum)
#endif
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
#ifdef XINERAMA
}
#endif
if (pwin->optional) { if (pwin->optional) {
pwin->optional->colormap = None; pwin->optional->colormap = None;
CheckWindowOptionalNeed (pwin); CheckWindowOptionalNeed (pwin);
@ -502,9 +515,12 @@ TellLostMap (pwin, value)
Colormap *pmid = (Colormap *)value; Colormap *pmid = (Colormap *)value;
xEvent xE; xEvent xE;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum) /*
return WT_STOPWALKING; * Only deliver event for Screen 0 when Xinerama enabled
*/
if (noXineramaExtension ||
(!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
#endif #endif
if (wColormap(pwin) == *pmid) if (wColormap(pwin) == *pmid)
{ {
@ -529,9 +545,12 @@ TellGainedMap (pwin, value)
Colormap *pmid = (Colormap *)value; Colormap *pmid = (Colormap *)value;
xEvent xE; xEvent xE;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum) /*
return WT_STOPWALKING; * Only deliver event for Screen 0 when Xinerama enabled
*/
if (noXineramaExtension ||
(!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
#endif #endif
if (wColormap (pwin) == *pmid) if (wColormap (pwin) == *pmid)
{ {

View File

@ -1,3 +1,4 @@
/* $XdotOrg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ /* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
/************************************************************ /************************************************************
@ -46,7 +47,7 @@ SOFTWARE.
********************************************************/ ********************************************************/
/* The panoramix components contained the following notice */ /* The Xinerama components contained the following notice */
/**************************************************************** /****************************************************************
* * * *
* Copyright (c) Digital Equipment Corporation, 1991, 1997 * * Copyright (c) Digital Equipment Corporation, 1991, 1997 *
@ -70,7 +71,7 @@ SOFTWARE.
/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.33 2003/11/17 22:20:33 dawes Exp $ */ /* $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> #include <stdio.h>
int ProcInitialConnection(); int ProcInitialConnection();
#endif #endif
@ -91,9 +92,9 @@ int ProcInitialConnection();
#include "dispatch.h" #include "dispatch.h"
#include "swaprep.h" #include "swaprep.h"
#include "swapreq.h" #include "swapreq.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#ifdef XCSECURITY #ifdef XCSECURITY
#define _SECURITY_SERVER #define _SECURITY_SERVER
@ -2641,8 +2642,8 @@ ProcAllocColor(client)
else else
return (retval); return (retval);
} }
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension || !pmap->pScreen->myNum) if (noXineramaExtension || !pmap->pScreen->myNum)
#endif #endif
WriteReplyToClient(client, sizeof(xAllocColorReply), &acr); WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
return (client->noClientException); return (client->noClientException);
@ -2700,8 +2701,8 @@ ProcAllocNamedColor (client)
else else
return(retval); return(retval);
} }
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension || !pcmp->pScreen->myNum) if (noXineramaExtension || !pcmp->pScreen->myNum)
#endif #endif
WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr); WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
return (client->noClientException); return (client->noClientException);
@ -2770,8 +2771,8 @@ ProcAllocColorCells (client)
else else
return(retval); return(retval);
} }
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension || !pcmp->pScreen->myNum) if (noXineramaExtension || !pcmp->pScreen->myNum)
#endif #endif
{ {
accr.type = X_Reply; accr.type = X_Reply;
@ -2849,8 +2850,8 @@ ProcAllocColorPlanes(client)
return(retval); return(retval);
} }
acpr.length = length >> 2; acpr.length = length >> 2;
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension || !pcmp->pScreen->myNum) if (noXineramaExtension || !pcmp->pScreen->myNum)
#endif #endif
{ {
WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr); WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr);
@ -3932,8 +3933,8 @@ SendConnSetup(client, reason)
#endif #endif
/* fill in the "currentInputMask" */ /* fill in the "currentInputMask" */
root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart); root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart);
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension) if (noXineramaExtension)
numScreens = screenInfo.numScreens; numScreens = screenInfo.numScreens;
else else
numScreens = ((xConnSetup *)ConnectionInfo)->numRoots; numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/dix/dixfonts.c,v 3.29 2003/11/17 22:20:34 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.29 2003/11/17 22:20:34 dawes Exp $ */ /* $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. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
@ -41,8 +42,9 @@ SOFTWARE.
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
extern Bool noXineramaExtension;
#endif #endif
#ifdef LBX #ifdef LBX
@ -1398,8 +1400,8 @@ bail:
if (c->err != Success) err = c->err; if (c->err != Success) err = c->err;
if (err != Success && c->client != serverClient) { if (err != Success && c->client != serverClient) {
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension || !c->pGC->pScreen->myNum) if (noXineramaExtension || !c->pGC->pScreen->myNum)
#endif #endif
SendErrorToClient(c->client, c->reqType, 0, 0, err); SendErrorToClient(c->client, c->reqType, 0, 0, err);
} }

View File

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

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 3.44 2003/11/17 22:20:34 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.44 2003/11/17 22:20:34 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/dix/main.c,v 3.44 2003/11/17 22:20:34 dawes Exp $ */
/*********************************************************** /***********************************************************
@ -47,7 +48,7 @@ SOFTWARE.
******************************************************************/ ******************************************************************/
/* $Xorg: main.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* $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 * * Copyright (c) Digital Equipment Corporation, 1991, 1997 *
@ -92,8 +93,8 @@ SOFTWARE.
#include "site.h" #include "site.h"
#include "dixfont.h" #include "dixfont.h"
#include "extnsionst.h" #include "extnsionst.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiXsrv.h" extern Bool noXineramaExtension;
#else #else
#include "dixevents.h" /* InitEvents() */ #include "dixevents.h" /* InitEvents() */
#include "dispatch.h" /* InitProcVectors() */ #include "dispatch.h" /* InitProcVectors() */
@ -122,7 +123,7 @@ extern int screenPrivateCount;
extern void InitProcVectors(void); extern void InitProcVectors(void);
extern Bool CreateGCperDepthArray(void); extern Bool CreateGCperDepthArray(void);
#ifndef PANORAMIX #ifndef XINERAMA
static static
#endif #endif
Bool CreateConnectionBlock(void); Bool CreateConnectionBlock(void);
@ -402,12 +403,12 @@ main(int argc, char *argv[], char *envp[])
DPMSEnabled = FALSE; DPMSEnabled = FALSE;
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
/* /*
* Consolidate window and colourmap information for each screen * Consolidate window and colourmap information for each screen
*/ */
if (!noPanoramiXExtension) if (!noXineramaExtension)
PanoramiXConsolidate(); XineramaConsolidate();
#endif #endif
for (i = 0; i < screenInfo.numScreens; i++) for (i = 0; i < screenInfo.numScreens; i++)
@ -418,9 +419,9 @@ main(int argc, char *argv[], char *envp[])
SetDPMSTimers(); SetDPMSTimers();
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
if (!noPanoramiXExtension) { if (!noXineramaExtension) {
if (!PanoramiXCreateConnectionBlock()) if (!XineramaCreateConnectionBlock())
FatalError("could not create connection block info"); FatalError("could not create connection block info");
} else } else
#endif #endif
@ -437,12 +438,12 @@ main(int argc, char *argv[], char *envp[])
FreeScreenSaverTimer(); FreeScreenSaverTimer();
CloseDownExtensions(); CloseDownExtensions();
#ifdef PANORAMIX #ifdef XINERAMA
{ {
Bool remember_it = noPanoramiXExtension; Bool remember_it = noXineramaExtension;
noPanoramiXExtension = TRUE; noXineramaExtension = TRUE;
FreeAllResources(); FreeAllResources();
noPanoramiXExtension = remember_it; noXineramaExtension = remember_it;
} }
#else #else
FreeAllResources(); FreeAllResources();
@ -492,7 +493,7 @@ main(int argc, char *argv[], char *envp[])
static int padlength[4] = {0, 3, 2, 1}; static int padlength[4] = {0, 3, 2, 1};
#ifndef PANORAMIX #ifndef XINERAMA
static static
#endif #endif
Bool Bool

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/************************************************************ /************************************************************
Copyright 1987, 1998 The Open Group Copyright 1987, 1998 The Open Group
@ -88,9 +89,9 @@ SOFTWARE.
#include "dixevents.h" #include "dixevents.h"
#include "dixgrabs.h" #include "dixgrabs.h"
#include "cursor.h" #include "cursor.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#include <assert.h> #include <assert.h>
@ -672,7 +673,7 @@ FindAllClientResources(
} }
} }
#ifndef NO_XINERAMA_PORT
pointer pointer
LookupClientResourceComplex( LookupClientResourceComplex(
ClientPtr client, ClientPtr client,
@ -698,7 +699,7 @@ LookupClientResourceComplex(
} }
return NULL; return NULL;
} }
#endif /* NO_XINERAMA_PORT */
void void
FreeClientNeverRetainResources(ClientPtr client) FreeClientNeverRetainResources(ClientPtr client)
@ -797,17 +798,17 @@ LegalNewID(id, client)
register ClientPtr client; register ClientPtr client;
{ {
#ifdef PANORAMIX #ifdef XINERAMA
XID minid, maxid; XID minid, maxid;
if (!noPanoramiXExtension) { if (!noXineramaExtension) {
minid = client->clientAsMask | (client->index ? minid = client->clientAsMask | (client->index ?
SERVER_BIT : SERVER_MINID); SERVER_BIT : SERVER_MINID);
maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1; maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1;
if ((id >= minid) && (id <= maxid)) if ((id >= minid) && (id <= maxid))
return TRUE; return TRUE;
} }
#endif /* PANORAMIX */ #endif /* XINERAMA */
return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) && return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) &&
((clientTable[client->index].expectID <= id) || ((clientTable[client->index].expectID <= id) ||
!LookupIDByClass(id, RC_ANY))); !LookupIDByClass(id, RC_ANY)));

View File

@ -1,3 +1,4 @@
/* $XdotOrg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */
/* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */
/* /*
@ -48,7 +49,7 @@ SOFTWARE.
*/ */
/* The panoramix components contained the following notice */ /* The Xinerama components contained the following notice */
/**************************************************************** /****************************************************************
* * * *
* Copyright (c) Digital Equipment Corporation, 1991, 1997 * * Copyright (c) Digital Equipment Corporation, 1991, 1997 *
@ -85,9 +86,9 @@ SOFTWARE.
#include "dixstruct.h" #include "dixstruct.h"
#include "gcstruct.h" #include "gcstruct.h"
#include "servermd.h" #include "servermd.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#include "dixevents.h" #include "dixevents.h"
#include "globals.h" #include "globals.h"
@ -2320,10 +2321,10 @@ ConfigureWindow(pWin, mask, vlist, client)
event.u.u.detail = Above; event.u.u.detail = Above;
event.u.configureRequest.x = x; event.u.configureRequest.x = x;
event.u.configureRequest.y = y; event.u.configureRequest.y = y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { if(!noXineramaExtension && (!pParent || !pParent->parent)) {
event.u.configureRequest.x += panoramiXdataPtr[0].x; event.u.configureRequest.x += xineramaDataPtr[0].x;
event.u.configureRequest.y += panoramiXdataPtr[0].y; event.u.configureRequest.y += xineramaDataPtr[0].y;
} }
#endif #endif
event.u.configureRequest.width = w; event.u.configureRequest.width = w;
@ -2406,10 +2407,10 @@ ActuallyDoSomething:
event.u.configureNotify.aboveSibling = None; event.u.configureNotify.aboveSibling = None;
event.u.configureNotify.x = x; event.u.configureNotify.x = x;
event.u.configureNotify.y = y; event.u.configureNotify.y = y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { if(!noXineramaExtension && (!pParent || !pParent->parent)) {
event.u.configureNotify.x += panoramiXdataPtr[0].x; event.u.configureNotify.x += xineramaDataPtr[0].x;
event.u.configureNotify.y += panoramiXdataPtr[0].y; event.u.configureNotify.y += xineramaDataPtr[0].y;
} }
#endif #endif
event.u.configureNotify.width = w; event.u.configureNotify.width = w;
@ -2564,10 +2565,10 @@ ReparentWindow(pWin, pParent, x, y, client)
event.u.reparent.parent = pParent->drawable.id; event.u.reparent.parent = pParent->drawable.id;
event.u.reparent.x = x; event.u.reparent.x = x;
event.u.reparent.y = y; event.u.reparent.y = y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && !pParent->parent) { if(!noXineramaExtension && !pParent->parent) {
event.u.reparent.x += panoramiXdataPtr[0].x; event.u.reparent.x += xineramaDataPtr[0].x;
event.u.reparent.y += panoramiXdataPtr[0].y; event.u.reparent.y += xineramaDataPtr[0].y;
} }
#endif #endif
event.u.reparent.override = pWin->overrideRedirect; event.u.reparent.override = pWin->overrideRedirect;
@ -2937,10 +2938,10 @@ UnrealizeTree(
{ {
pChild->realized = FALSE; pChild->realized = FALSE;
pChild->visibility = VisibilityNotViewable; pChild->visibility = VisibilityNotViewable;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { if(!noXineramaExtension && !pChild->drawable.pScreen->myNum) {
PanoramiXRes *win; XineramaRes *win;
win = (PanoramiXRes*)LookupIDByType(pChild->drawable.id, win = (XineramaRes*)LookupIDByType(pChild->drawable.id,
XRT_WINDOW); XRT_WINDOW);
if(win) if(win)
win->u.win.visibility = VisibilityNotViewable; win->u.win.visibility = VisibilityNotViewable;
@ -3219,25 +3220,26 @@ SendVisibilityNotify(pWin)
WindowPtr pWin; WindowPtr pWin;
{ {
xEvent event; xEvent event;
#ifndef NO_XINERAMA_PORT
unsigned int visibility = pWin->visibility; unsigned int visibility = pWin->visibility;
#endif
#ifdef PANORAMIX #ifdef XINERAMA
/* This is not quite correct yet, but it's close */ /* This is not quite correct yet, but it's close */
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
PanoramiXRes *win; XineramaRes *win;
WindowPtr pWin2; WindowPtr pWin2;
int i, Scrnum; int i, Scrnum;
Scrnum = pWin->drawable.pScreen->myNum; 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)) if(!win || (win->u.win.visibility == visibility))
return; return;
switch(visibility) { switch(visibility) {
case VisibilityUnobscured: case VisibilityUnobscured:
for(i = 0; i < PanoramiXNumScreens; i++) { for(i = 0; i < XineramaNumScreens; i++) {
if(i == Scrnum) continue; if(i == Scrnum) continue;
pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
@ -3257,7 +3259,7 @@ SendVisibilityNotify(pWin)
} }
break; break;
case VisibilityFullyObscured: case VisibilityFullyObscured:
for(i = 0; i < PanoramiXNumScreens; i++) { for(i = 0; i < XineramaNumScreens; i++) {
if(i == Scrnum) continue; if(i == Scrnum) continue;
pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
@ -3275,7 +3277,6 @@ SendVisibilityNotify(pWin)
win->u.win.visibility = visibility; win->u.win.visibility = visibility;
} }
#endif #endif
event.u.u.type = VisibilityNotify; event.u.u.type = VisibilityNotify;
event.u.visibility.window = pWin->drawable.id; event.u.visibility.window = pWin->drawable.id;
event.u.visibility.state = visibility; event.u.visibility.state = visibility;

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $ * Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
* *
@ -223,9 +224,9 @@ fbFillRegionSolid (DrawablePtr pDrawable,
} }
} }
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
void void
@ -247,14 +248,14 @@ fbFillRegionTiled (DrawablePtr pDrawable,
int xRot = pDrawable->x; int xRot = pDrawable->x;
int yRot = pDrawable->y; int yRot = pDrawable->y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
{ {
int index = pDrawable->pScreen->myNum; int index = pDrawable->pScreen->myNum;
if(&WindowTable[index]->drawable == pDrawable) if(&WindowTable[index]->drawable == pDrawable)
{ {
xRot -= panoramiXdataPtr[index].x; xRot -= xineramaDataPtr[index].x;
yRot -= panoramiXdataPtr[index].y; yRot -= xineramaDataPtr[index].y;
} }
} }
#endif #endif

View File

@ -1792,13 +1792,13 @@
F5269C2D01D5BC3501000001 = { F5269C2D01D5BC3501000001 = {
fileEncoding = 30; fileEncoding = 30;
isa = PBXFileReference; isa = PBXFileReference;
path = pseudoramiX.c; path = pseudorama.c;
refType = 4; refType = 4;
}; };
F5269C2E01D5BC3501000001 = { F5269C2E01D5BC3501000001 = {
fileEncoding = 30; fileEncoding = 30;
isa = PBXFileReference; isa = PBXFileReference;
path = pseudoramiX.h; path = pseudorama.h;
refType = 4; refType = 4;
}; };
F53321390193CB6A01000001 = { F53321390193CB6A01000001 = {

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.1.4.1 2003/12/06 13:24:23 kaleb Exp $ */
/* /*
* Cocoa rootless implementation initialization * Cocoa rootless implementation initialization
*/ */
@ -27,7 +28,6 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.6 2003/11/27 01:59:53 torrey Exp $ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.6 2003/11/27 01:59:53 torrey Exp $ */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.6 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h" #include "quartzCommon.h"
@ -40,7 +40,7 @@
#include "quartzCursor.h" #include "quartzCursor.h"
#include "rootless.h" #include "rootless.h"
#include "safeAlpha.h" #include "safeAlpha.h"
#include "pseudoramiX.h" #include "pseudorama.h"
#include "applewmExt.h" #include "applewmExt.h"
#include "regionstr.h" #include "regionstr.h"
@ -59,8 +59,8 @@ static Class classXView = nil;
* CRDisplayInit * CRDisplayInit
* Find all screens. * Find all screens.
* *
* Multihead note: When rootless mode uses PseudoramiX, the * Multihead note: When rootless mode uses Pseudorama, the
* X server only sees one screen; only PseudoramiX itself knows * X server only sees one screen; only Pseudorama itself knows
* about all of the screens. * about all of the screens.
*/ */
static void static void
@ -68,10 +68,10 @@ CRDisplayInit(void)
{ {
ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n"); ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n");
if (noPseudoramiXExtension) { if (noPseudoramaExtension) {
darwinScreensFound = [[NSScreen screens] count]; darwinScreensFound = [[NSScreen screens] count];
} else { } else {
darwinScreensFound = 1; // only PseudoramiX knows about the rest darwinScreensFound = 1; // only Pseudorama knows about the rest
} }
CRAppleWMInit(); CRAppleWMInit();
@ -89,7 +89,7 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent; dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent;
if (noPseudoramiXExtension) { if (noPseudoramaExtension) {
NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; NSScreen *screen = [[NSScreen screens] objectAtIndex:index];
NSRect frame = [screen frame]; NSRect frame = [screen frame];
@ -133,7 +133,7 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
dfb->height = unionRect.size.height; dfb->height = unionRect.size.height;
dfb->pitch = (dfb->width) * (dfb->bitsPerPixel) / 8; dfb->pitch = (dfb->width) * (dfb->bitsPerPixel) / 8;
// Tell PseudoramiX about the real screens. // Tell Pseudorama about the real screens.
// InitOutput() will move the big screen to (0,0), // InitOutput() will move the big screen to (0,0),
// so compensate for that here. // so compensate for that here.
for (i = 0; i < [screens count]; i++) { for (i = 0; i < [screens count]; i++) {
@ -144,7 +144,7 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
// Skip this screen if it's a mirrored copy of an earlier screen. // Skip this screen if it's a mirrored copy of an earlier screen.
for (j = 0; j < i; j++) { for (j = 0; j < i; j++) {
if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) {
ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", ErrorF("Pseudorama screen %d is a mirror of screen %d.\n",
i, j); i, j);
break; break;
} }
@ -159,17 +159,17 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
frame.size.height -= aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight;
} }
ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, ErrorF("Pseudorama screen %d added: %dx%d @ (%d,%d).\n", i,
(int)frame.size.width, (int)frame.size.height, (int)frame.size.width, (int)frame.size.height,
(int)frame.origin.x, (int)frame.origin.y); (int)frame.origin.x, (int)frame.origin.y);
frame.origin.x -= unionRect.origin.x; frame.origin.x -= unionRect.origin.x;
frame.origin.y -= unionRect.origin.y; frame.origin.y -= unionRect.origin.y;
ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", ErrorF("Pseudorama screen %d placed at X11 coordinate (%d,%d).\n",
i, (int)frame.origin.x, (int)frame.origin.y); i, (int)frame.origin.x, (int)frame.origin.y);
PseudoramiXAddScreen(frame.origin.x, frame.origin.y, PseudoramaAddScreen(frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height); frame.size.width, frame.size.height);
} }
} }
@ -219,7 +219,7 @@ CRAddScreen(int index, ScreenPtr pScreen)
// This X11 screen covers all CoreGraphics displays we just found. // This X11 screen covers all CoreGraphics displays we just found.
// If there's more than one CG display, then video mirroring is on // If there's more than one CG display, then video mirroring is on
// or PseudoramiX is on. // or Pseudorama is on.
displayInfo->displayCount = allocatedDisplays; displayInfo->displayCount = allocatedDisplays;
displayInfo->displayIDs = displays; displayInfo->displayIDs = displays;

View File

@ -1,420 +0,0 @@
/*
* Minimal implementation of PanoramiX/Xinerama
*
* This is used in rootless mode where the underlying window server
* already provides an abstracted view of multiple screens as one
* large screen area.
*
* This code is largely based on panoramiX.c, which contains the
* following copyright notice:
*/
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.3 2003/04/30 23:15:39 torrey Exp $ */
#include "pseudoramiX.h"
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"
#include "panoramiXproto.h"
#include "globals.h"
extern int ProcPanoramiXQueryVersion (ClientPtr client);
static void PseudoramiXResetProc(ExtensionEntry *extEntry);
static int ProcPseudoramiXQueryVersion(ClientPtr client);
static int ProcPseudoramiXGetState(ClientPtr client);
static int ProcPseudoramiXGetScreenCount(ClientPtr client);
static int ProcPseudoramiXGetScreenSize(ClientPtr client);
static int ProcPseudoramiXIsActive(ClientPtr client);
static int ProcPseudoramiXQueryScreens(ClientPtr client);
static int ProcPseudoramiXDispatch(ClientPtr client);
static int SProcPseudoramiXQueryVersion(ClientPtr client);
static int SProcPseudoramiXGetState(ClientPtr client);
static int SProcPseudoramiXGetScreenCount(ClientPtr client);
static int SProcPseudoramiXGetScreenSize(ClientPtr client);
static int SProcPseudoramiXIsActive(ClientPtr client);
static int SProcPseudoramiXQueryScreens(ClientPtr client);
static int SProcPseudoramiXDispatch(ClientPtr client);
typedef struct {
int x;
int y;
int w;
int h;
} PseudoramiXScreenRec;
static PseudoramiXScreenRec *pseudoramiXScreens = NULL;
static int pseudoramiXScreensAllocated = 0;
static int pseudoramiXNumScreens = 0;
static unsigned long pseudoramiXGeneration = 0;
// Add a PseudoramiX screen.
// The rest of the X server will know nothing about this screen.
// Can be called before or after extension init.
// Screens must be re-added once per generation.
void
PseudoramiXAddScreen(int x, int y, int w, int h)
{
PseudoramiXScreenRec *s;
if (noPseudoramiXExtension) return;
if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) {
pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1;
pseudoramiXScreens = xrealloc(pseudoramiXScreens,
pseudoramiXScreensAllocated *
sizeof(PseudoramiXScreenRec));
}
s = &pseudoramiXScreens[pseudoramiXNumScreens++];
s->x = x;
s->y = y;
s->w = w;
s->h = h;
}
// Initialize PseudoramiX.
// Copied from PanoramiXExtensionInit
void PseudoramiXExtensionInit(int argc, char *argv[])
{
Bool success = FALSE;
ExtensionEntry *extEntry;
if (noPseudoramiXExtension) return;
if (pseudoramiXNumScreens == 1) {
// Only one screen - disable Xinerama extension.
noPseudoramiXExtension = TRUE;
return;
}
// The server must not run the PanoramiX operations.
noPanoramiXExtension = TRUE;
if (pseudoramiXGeneration != serverGeneration) {
extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0,
ProcPseudoramiXDispatch,
SProcPseudoramiXDispatch,
PseudoramiXResetProc,
StandardMinorOpcode);
if (!extEntry) {
ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n");
} else {
pseudoramiXGeneration = serverGeneration;
success = TRUE;
}
}
if (!success) {
ErrorF("%s Extension (PseudoramiX) failed to initialize\n",
PANORAMIX_PROTOCOL_NAME);
return;
}
}
static void PseudoramiXResetProc(ExtensionEntry *extEntry)
{
pseudoramiXNumScreens = 0;
}
// was PanoramiX
static int ProcPseudoramiXQueryVersion(ClientPtr client)
{
return ProcPanoramiXQueryVersion(client);
}
// was PanoramiX
static int ProcPseudoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
register int n;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.state = !noPseudoramiXExtension;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swaps (&rep.state, n);
}
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
return client->noClientException;
}
// was PanoramiX
static int ProcPseudoramiXGetScreenCount(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenCountReq);
WindowPtr pWin;
xPanoramiXGetScreenCountReply rep;
register int n;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.ScreenCount = pseudoramiXNumScreens;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swaps (&rep.ScreenCount, n);
}
WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
return client->noClientException;
}
// was PanoramiX
static int ProcPseudoramiXGetScreenSize(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenSizeReq);
WindowPtr pWin;
xPanoramiXGetScreenSizeReply rep;
register int n;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
/* screen dimensions */
rep.width = pseudoramiXScreens[stuff->screen].w;
// was panoramiXdataPtr[stuff->screen].width;
rep.height = pseudoramiXScreens[stuff->screen].h;
// was panoramiXdataPtr[stuff->screen].height;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swaps (&rep.width, n);
swaps (&rep.height, n);
}
WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
return client->noClientException;
}
// was Xinerama
static int ProcPseudoramiXIsActive(ClientPtr client)
{
/* REQUEST(xXineramaIsActiveReq); */
xXineramaIsActiveReply rep;
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.state = !noPseudoramiXExtension;
if (client->swapped) {
register int n;
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.state, n);
}
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
return client->noClientException;
}
// was Xinerama
static int ProcPseudoramiXQueryScreens(ClientPtr client)
{
/* REQUEST(xXineramaQueryScreensReq); */
xXineramaQueryScreensReply rep;
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
rep.length = rep.number * sz_XineramaScreenInfo >> 2;
if (client->swapped) {
register int n;
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.number, n);
}
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
if (!noPseudoramiXExtension) {
xXineramaScreenInfo scratch;
int i;
for(i = 0; i < pseudoramiXNumScreens; i++) {
scratch.x_org = pseudoramiXScreens[i].x;
scratch.y_org = pseudoramiXScreens[i].y;
scratch.width = pseudoramiXScreens[i].w;
scratch.height = pseudoramiXScreens[i].h;
if(client->swapped) {
register int n;
swaps (&scratch.x_org, n);
swaps (&scratch.y_org, n);
swaps (&scratch.width, n);
swaps (&scratch.height, n);
}
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
}
}
return client->noClientException;
}
// was PanoramiX
static int ProcPseudoramiXDispatch (ClientPtr client)
{ REQUEST(xReq);
switch (stuff->data)
{
case X_PanoramiXQueryVersion:
return ProcPseudoramiXQueryVersion(client);
case X_PanoramiXGetState:
return ProcPseudoramiXGetState(client);
case X_PanoramiXGetScreenCount:
return ProcPseudoramiXGetScreenCount(client);
case X_PanoramiXGetScreenSize:
return ProcPseudoramiXGetScreenSize(client);
case X_XineramaIsActive:
return ProcPseudoramiXIsActive(client);
case X_XineramaQueryScreens:
return ProcPseudoramiXQueryScreens(client);
}
return BadRequest;
}
static int
SProcPseudoramiXQueryVersion (ClientPtr client)
{
REQUEST(xPanoramiXQueryVersionReq);
register int n;
swaps(&stuff->length,n);
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
return ProcPseudoramiXQueryVersion(client);
}
static int
SProcPseudoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
return ProcPseudoramiXGetState(client);
}
static int
SProcPseudoramiXGetScreenCount(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenCountReq);
register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
return ProcPseudoramiXGetScreenCount(client);
}
static int
SProcPseudoramiXGetScreenSize(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenSizeReq);
register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
return ProcPseudoramiXGetScreenSize(client);
}
static int
SProcPseudoramiXIsActive(ClientPtr client)
{
REQUEST(xXineramaIsActiveReq);
register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
return ProcPseudoramiXIsActive(client);
}
static int
SProcPseudoramiXQueryScreens(ClientPtr client)
{
REQUEST(xXineramaQueryScreensReq);
register int n;
swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
return ProcPseudoramiXQueryScreens(client);
}
static int
SProcPseudoramiXDispatch (ClientPtr client)
{ REQUEST(xReq);
switch (stuff->data)
{
case X_PanoramiXQueryVersion:
return SProcPseudoramiXQueryVersion(client);
case X_PanoramiXGetState:
return SProcPseudoramiXGetState(client);
case X_PanoramiXGetScreenCount:
return SProcPseudoramiXGetScreenCount(client);
case X_PanoramiXGetScreenSize:
return SProcPseudoramiXGetScreenSize(client);
case X_XineramaIsActive:
return SProcPseudoramiXIsActive(client);
case X_XineramaQueryScreens:
return SProcPseudoramiXQueryScreens(client);
}
return BadRequest;
}

View File

@ -1,9 +0,0 @@
/*
* Minimal implementation of PanoramiX/Xinerama
*/
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.2 2003/04/30 23:15:39 torrey Exp $ */
extern int noPseudoramiXExtension;
void PseudoramiXAddScreen(int x, int y, int w, int h);
void PseudoramiXExtensionInit(int argc, char *argv[]);

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.2 2003/04/30 23:15:39 torrey Exp $ */
/************************************************************** /**************************************************************
* *
* Quartz-specific support for the Darwin X Server * Quartz-specific support for the Darwin X Server
@ -29,14 +30,13 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.14 2003/11/24 05:39:02 torrey Exp $ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.14 2003/11/24 05:39:02 torrey Exp $ */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.14 2003/11/24 05:39:02 torrey Exp $ */
#include "quartzCommon.h" #include "quartzCommon.h"
#include "quartz.h" #include "quartz.h"
#include "darwin.h" #include "darwin.h"
#include "quartzAudio.h" #include "quartzAudio.h"
#include "pseudoramiX.h" #include "pseudorama.h"
#define _APPLEWM_SERVER_ #define _APPLEWM_SERVER_
#include "applewm.h" #include "applewm.h"
#include "applewmExt.h" #include "applewmExt.h"
@ -61,7 +61,7 @@ int quartzServerVisible = TRUE;
int quartzServerQuitting = FALSE; int quartzServerQuitting = FALSE;
int quartzScreenIndex = 0; int quartzScreenIndex = 0;
int aquaMenuBarHeight = 0; int aquaMenuBarHeight = 0;
int noPseudoramiXExtension = TRUE; int noPseudoramaExtension = TRUE;
QuartzModeProcsPtr quartzProcs = NULL; QuartzModeProcsPtr quartzProcs = NULL;
const char *quartzOpenGLBundle = NULL; const char *quartzOpenGLBundle = NULL;
@ -140,11 +140,11 @@ void DarwinModeInitOutput(
// Do display mode specific initialization // Do display mode specific initialization
quartzProcs->DisplayInit(); quartzProcs->DisplayInit();
// Init PseudoramiX implementation of Xinerama. // Init Pseudorama implementation of Xinerama.
// This should be in InitExtensions, but that causes link errors // This should be in InitExtensions, but that causes link errors
// for servers that don't link in pseudoramiX.c. // for servers that don't link in pseudorama.c.
if (!noPseudoramiXExtension) { if (!noPseudoramaExtension) {
PseudoramiXExtensionInit(argc, argv); PseudoramaExtensionInit(argc, argv);
} }
} }

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/************************************************************** /**************************************************************
* *
* Quartz-specific support for the Darwin X Server * Quartz-specific support for the Darwin X Server
@ -44,11 +45,11 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#import "Preferences.h" #import "Preferences.h"
#include "pseudoramiX.h" #include "pseudorama.h"
extern void FatalError(const char *, ...); extern void FatalError(const char *, ...);
extern char *display; extern char *display;
extern int noPanoramiXExtension; extern int noXineramaExtension;
/* /*
@ -67,14 +68,14 @@ void QuartzReadPreferences(void)
// quartzRootless has already been set // quartzRootless has already been set
if (quartzRootless) { if (quartzRootless) {
// Use PseudoramiX instead of Xinerama // Use Pseudorama instead of Xinerama
noPanoramiXExtension = TRUE; noXineramaExtension = TRUE;
noPseudoramiXExtension = ![Preferences xinerama]; noPseudoramaExtension = ![Preferences xinerama];
quartzUseAGL = [Preferences useAGL]; quartzUseAGL = [Preferences useAGL];
} else { } else {
noPanoramiXExtension = ![Preferences xinerama]; noXineramaExtension = ![Preferences xinerama];
noPseudoramiXExtension = TRUE; noPseudoramaExtension = TRUE;
// Full screen can't use AGL for GLX // Full screen can't use AGL for GLX
quartzUseAGL = FALSE; quartzUseAGL = FALSE;

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* quartzCommon.h * quartzCommon.h
* *
@ -52,7 +53,7 @@
typedef struct { typedef struct {
// List of CoreGraphics displays that this X11 screen covers. // List of CoreGraphics displays that this X11 screen covers.
// This is more than one CG display for video mirroring and // This is more than one CG display for video mirroring and
// rootless PseudoramiX mode. // rootless Pseudorama mode.
// No CG display will be covered by more than one X11 screen. // No CG display will be covered by more than one X11 screen.
int displayCount; int displayCount;
CGDirectDisplayID *displayIDs; CGDirectDisplayID *displayIDs;

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.1.4.1 2003/12/06 13:24:23 kaleb Exp $ */
/* /*
* Xplugin rootless implementation screen functions * Xplugin rootless implementation screen functions
*/ */
@ -27,13 +28,12 @@
* holders shall not be used in advertising or otherwise to promote the sale, * holders shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in this Software without prior written authorization. * use or other dealings in this Software without prior written authorization.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.9 2003/11/27 01:59:53 torrey Exp $ */
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.9 2003/11/27 01:59:53 torrey Exp $ */ /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.9 2003/11/27 01:59:53 torrey Exp $ */
#include "quartzCommon.h" #include "quartzCommon.h"
#include "quartz.h" #include "quartz.h"
#include "xpr.h" #include "xpr.h"
#include "pseudoramiX.h" #include "pseudorama.h"
#include "darwin.h" #include "darwin.h"
#include "rootless.h" #include "rootless.h"
#include "safeAlpha.h" #include "safeAlpha.h"
@ -139,11 +139,11 @@ displayScreenBounds(CGDirectDisplayID id)
/* /*
* addPseudoramiXScreens * addPseudoramaScreens
* Add a physical screen with PseudoramiX. * Add a physical screen with Pseudorama.
*/ */
static void static void
addPseudoramiXScreens(int *x, int *y, int *width, int *height) addPseudoramaScreens(int *x, int *y, int *width, int *height)
{ {
CGDisplayCount i, displayCount; CGDisplayCount i, displayCount;
CGDirectDisplayID *displayList = NULL; CGDirectDisplayID *displayList = NULL;
@ -168,24 +168,24 @@ addPseudoramiXScreens(int *x, int *y, int *width, int *height)
*width = unionRect.size.width; *width = unionRect.size.width;
*height = unionRect.size.height; *height = unionRect.size.height;
/* Tell PseudoramiX about the real screens. */ /* Tell Pseudorama about the real screens. */
for (i = 0; i < displayCount; i++) for (i = 0; i < displayCount; i++)
{ {
CGDirectDisplayID dpy = displayList[i]; CGDirectDisplayID dpy = displayList[i];
frame = displayScreenBounds(dpy); frame = displayScreenBounds(dpy);
ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, ErrorF("Pseudorama screen %d added: %dx%d @ (%d,%d).\n", i,
(int)frame.size.width, (int)frame.size.height, (int)frame.size.width, (int)frame.size.height,
(int)frame.origin.x, (int)frame.origin.y); (int)frame.origin.x, (int)frame.origin.y);
frame.origin.x -= unionRect.origin.x; frame.origin.x -= unionRect.origin.x;
frame.origin.y -= unionRect.origin.y; frame.origin.y -= unionRect.origin.y;
ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", ErrorF("Pseudorama screen %d placed at X11 coordinate (%d,%d).\n",
i, (int)frame.origin.x, (int)frame.origin.y); i, (int)frame.origin.x, (int)frame.origin.y);
PseudoramiXAddScreen(frame.origin.x, frame.origin.y, PseudoramaAddScreen(frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height); frame.size.width, frame.size.height);
} }
@ -206,10 +206,10 @@ xprDisplayInit(void)
CGGetActiveDisplayList(0, NULL, &displayCount); CGGetActiveDisplayList(0, NULL, &displayCount);
/* With PseudoramiX, the X server only sees one screen; only PseudoramiX /* With Pseudorama, the X server only sees one screen; only Pseudorama
itself knows about all of the screens. */ itself knows about all of the screens. */
if (noPseudoramiXExtension) if (noPseudoramaExtension)
darwinScreensFound = displayCount; darwinScreensFound = displayCount;
else else
darwinScreensFound = 1; darwinScreensFound = 1;
@ -270,7 +270,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->colorBitsPerPixel = 8; dfb->colorBitsPerPixel = 8;
} }
if (noPseudoramiXExtension) if (noPseudoramaExtension)
{ {
CGDirectDisplayID dpy; CGDirectDisplayID dpy;
CGRect frame; CGRect frame;
@ -286,7 +286,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
} }
else else
{ {
addPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height); addPseudoramaScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height);
} }
/* Passing zero width (pitch) makes miCreateScreenResources set the /* Passing zero width (pitch) makes miCreateScreenResources set the

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.277 2003/10/15 22:51:48 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.277 2003/10/15 22:51:48 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.277 2003/10/15 22:51:48 dawes Exp $ */
@ -1057,15 +1058,15 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
} }
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
from = X_DEFAULT; from = X_DEFAULT;
if (!noPanoramiXExtension) if (!noXineramaExtension)
from = X_CMDLINE; from = X_CMDLINE;
else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) { else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) {
noPanoramiXExtension = !value; noXineramaExtension = !value;
from = X_CONFIG; from = X_CONFIG;
} }
if (!noPanoramiXExtension) if (!noXineramaExtension)
xf86Msg(from, "Xinerama: enabled\n"); xf86Msg(from, "Xinerama: enabled\n");
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.47 2003/08/24 17:36:51 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.47 2003/08/24 17:36:51 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.47 2003/08/24 17:36:51 dawes Exp $ */
/* /*
* Copyright (c) 1998-2002 by The XFree86 Project, Inc. * Copyright (c) 1998-2002 by The XFree86 Project, Inc.
@ -139,8 +140,8 @@ DGAInit(
for(i = 0; i < num; i++) for(i = 0; i < num; i++)
modes[i].num = i + 1; modes[i].num = i + 1;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
for(i = 0; i < num; i++) for(i = 0; i < num; i++)
modes[i].flags &= ~DGA_PIXMAP_AVAILABLE; modes[i].flags &= ~DGA_PIXMAP_AVAILABLE;
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.69 2003/10/08 14:58:28 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.69 2003/10/08 14:58:28 dawes Exp $ */
/* /*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc. * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@ -1681,8 +1682,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
/* Lookup each mode */ /* Lookup each mode */
#ifdef RANDR #ifdef RANDR
if (!xf86Info.disableRandR if (!xf86Info.disableRandR
#ifdef PANORAMIX #ifdef XINERAMA
&& noPanoramiXExtension && noXineramaExtension
#endif #endif
) )
validateAllDefaultModes = TRUE; validateAllDefaultModes = TRUE;

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.8 2003/11/10 16:42:13 tsi Exp $ * $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.8 2003/11/10 16:42:13 tsi Exp $
* *
@ -243,9 +244,9 @@ xf86RandRInit (ScreenPtr pScreen)
XF86RandRInfoPtr randrp; XF86RandRInfoPtr randrp;
ScrnInfoPtr scrp = XF86SCRNINFO(pScreen); ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
#ifdef PANORAMIX #ifdef XINERAMA
/* XXX disable RandR when using Xinerama */ /* XXX disable RandR when using Xinerama */
if (!noPanoramiXExtension) if (!noXineramaExtension)
return TRUE; return TRUE;
#endif #endif
if (xf86RandRGeneration != serverGeneration) if (xf86RandRGeneration != serverGeneration)

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.2 2003/09/13 21:33:04 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.2 2003/09/13 21:33:04 dawes Exp $ */
#ifndef INITARGS #ifndef INITARGS
@ -136,7 +137,7 @@ extern void XpExtensionInit(INITARGS);
#endif #endif
#if 1 #if 1
extern void PanoramiXExtensionInit(int argc, char *argv[]); extern void XineramaExtensionInit(int argc, char *argv[]);
#endif #endif
#if 1 #if 1

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */
/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */
/************************************************************************** /**************************************************************************
@ -66,8 +67,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "mi.h" #include "mi.h"
#include "mipointer.h" #include "mipointer.h"
#if defined(XFree86LOADER) && !defined(PANORAMIX) #if defined(XFree86LOADER) && !defined(XINERAMA)
extern Bool noPanoramiXExtension; extern Bool noXineramaExtension;
#endif #endif
static int DRIScreenPrivIndex = -1; static int DRIScreenPrivIndex = -1;
@ -129,16 +130,16 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
* If Xinerama is on, don't allow DRI to initialise. It won't be usable * If Xinerama is on, don't allow DRI to initialise. It won't be usable
* anyway. * anyway.
*/ */
#if defined(PANORAMIX) && !defined(XFree86LOADER) #if defined(XINERAMA) && !defined(XFree86LOADER)
xineramaInCore = TRUE; xineramaInCore = TRUE;
#elif defined(XFree86LOADER) #elif defined(XFree86LOADER)
if (xf86LoaderCheckSymbol("noPanoramiXExtension")) if (xf86LoaderCheckSymbol("noXineramaExtension"))
xineramaInCore = TRUE; xineramaInCore = TRUE;
#endif #endif
#if defined(PANORAMIX) || defined(XFree86LOADER) #if defined(XINERAMA) || defined(XFree86LOADER)
if (xineramaInCore) { if (xineramaInCore) {
if (!noPanoramiXExtension) { if (!noXineramaExtension) {
DRIDrvMsg(pScreen->myNum, X_WARNING, DRIDrvMsg(pScreen->myNum, X_WARNING,
"Direct rendering is not supported when Xinerama is enabled\n"); "Direct rendering is not supported when Xinerama is enabled\n");
return FALSE; return FALSE;

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/************************************************************************** /**************************************************************************
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@ -109,7 +110,7 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin)
} }
else { else {
LoaderReqSymLists(drmSymbols, NULL); LoaderReqSymLists(drmSymbols, NULL);
LoaderRefSymbols("noPanoramiXExtension", NULL); LoaderRefSymbols("noXineramaExtension", NULL);
LoadExtension(&XF86DRIExt, FALSE); LoadExtension(&XF86DRIExt, FALSE);
} }
} else { } else {

View File

@ -1,4 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.62 2003/11/25 05:26:38 dawes Exp $ */ /* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.1.4.2 2003/12/06 13:24:26 kaleb Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.62 2003/11/25 05:26:38 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.62 2003/11/25 05:26:38 dawes Exp $ */
/* /*
@ -170,7 +170,7 @@ LOOKUP dixLookupTab[] = {
SYMVAR(EventCallback) SYMVAR(EventCallback)
SYMVAR(inputInfo) SYMVAR(inputInfo)
SYMVAR(SetCriticalEvent) SYMVAR(SetCriticalEvent)
#ifdef PANORAMIX #ifdef XINERAMA
SYMVAR(XineramaGetCursorScreen) SYMVAR(XineramaGetCursorScreen)
#endif #endif
/* property.c */ /* property.c */

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
/* /*
@ -27,8 +28,8 @@
#include "resource.h" #include "resource.h"
#include "sym.h" #include "sym.h"
#include "misc.h" #include "misc.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#endif #endif
#include "sleepuntil.h" #include "sleepuntil.h"
@ -38,11 +39,11 @@ extern int BadShmSegCode;
extern RESTYPE ShmSegType, ShmPixType; extern RESTYPE ShmSegType, ShmPixType;
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
extern Bool noPanoramiXExtension; extern Bool noXineramaExtension;
extern int PanoramiXNumScreens; extern int XineramaNumScreens;
extern PanoramiXData *panoramiXdataPtr; extern XineramaData *xineramaDataPtr;
extern XID *PanoramiXVisualTable; extern XID *XineramaVisualTable;
extern unsigned long XRT_WINDOW; extern unsigned long XRT_WINDOW;
extern unsigned long XRT_PIXMAP; extern unsigned long XRT_PIXMAP;
extern unsigned long XRT_GC; extern unsigned long XRT_GC;
@ -62,13 +63,13 @@ LOOKUP extLookupTab[] = {
SYMVAR(ShmSegType) SYMVAR(ShmSegType)
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
SYMFUNC(XineramaRegisterConnectionBlockCallback) SYMFUNC(XineramaRegisterConnectionBlockCallback)
SYMFUNC(XineramaDeleteResource) SYMFUNC(XineramaDeleteResource)
SYMVAR(noPanoramiXExtension) SYMVAR(noXineramaExtension)
SYMVAR(PanoramiXNumScreens) SYMVAR(XineramaNumScreens)
SYMVAR(panoramiXdataPtr) SYMVAR(xineramaDataPtr)
SYMVAR(PanoramiXVisualTable) SYMVAR(XineramaVisualTable)
SYMVAR(XRT_WINDOW) SYMVAR(XRT_WINDOW)
SYMVAR(XRT_PIXMAP) SYMVAR(XRT_PIXMAP)
SYMVAR(XRT_GC) SYMVAR(XRT_GC)

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */
/* /*
@ -64,9 +65,9 @@
#include "mifillarc.h" #include "mifillarc.h"
#include "micmap.h" #include "micmap.h"
#include "mioverlay.h" #include "mioverlay.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "resource.h" #include "resource.h"
#include "panoramiX.h" #include "xinerama.h"
#endif #endif
#ifdef RENDER #ifdef RENDER
#include "mipict.h" #include "mipict.h"

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.15 2003/11/10 18:22:41 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.15 2003/11/10 18:22:41 tsi Exp $ */
#include "misc.h" #include "misc.h"
@ -16,9 +17,9 @@
#include "pixmapstr.h" #include "pixmapstr.h"
#include "mioverlay.h" #include "mioverlay.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
static void static void
@ -166,12 +167,12 @@ XAAPaintWindow8_32(
xorg = pBgWin->drawable.x; xorg = pBgWin->drawable.x;
yorg = pBgWin->drawable.y; yorg = pBgWin->drawable.y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int index = pScreen->myNum; int index = pScreen->myNum;
if(WindowTable[index] == pBgWin) { if(WindowTable[index] == pBgWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPaintWin.c,v 1.11 2003/02/17 16:08:29 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPaintWin.c,v 1.11 2003/02/17 16:08:29 dawes Exp $ */
#include "misc.h" #include "misc.h"
@ -15,9 +16,9 @@
#include "pixmapstr.h" #include "pixmapstr.h"
#include "xaawrap.h" #include "xaawrap.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
void void
@ -91,12 +92,12 @@ XAAPaintWindow(
xorg = pBgWin->drawable.x; xorg = pBgWin->drawable.x;
yorg = pBgWin->drawable.y; yorg = pBgWin->drawable.y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int index = pScreen->myNum; int index = pScreen->myNum;
if(WindowTable[index] == pBgWin) { if(WindowTable[index] == pBgWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbpntwin.c,v 1.5 2001/10/01 13:44:15 eich Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbpntwin.c,v 1.5 2001/10/01 13:44:15 eich Exp $ */
#include "X.h" #include "X.h"
@ -14,9 +15,9 @@
#include "cfb8_32.h" #include "cfb8_32.h"
#include "mi.h" #include "mi.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
void void
@ -43,12 +44,12 @@ cfb8_32PaintWindow(
case BackgroundPixmap: case BackgroundPixmap:
xorg = pWin->drawable.x; xorg = pWin->drawable.x;
yorg = pWin->drawable.y; yorg = pWin->drawable.y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int index = pWin->drawable.pScreen->myNum; int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pWin) { if(WindowTable[index] == pWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif
@ -91,12 +92,12 @@ cfb8_32PaintWindow(
xorg = pBgWin->drawable.x; xorg = pBgWin->drawable.x;
yorg = pBgWin->drawable.y; yorg = pBgWin->drawable.y;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int index = pWin->drawable.pScreen->myNum; int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pBgWin) { if(WindowTable[index] == pBgWin) {
xorg -= panoramiXdataPtr[index].x; xorg -= xineramaDataPtr[index].x;
yorg -= panoramiXdataPtr[index].y; yorg -= xineramaDataPtr[index].y;
} }
} }
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.7 2003/04/27 21:31:04 herrb Exp $ */ /* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.7 2003/04/27 21:31:04 herrb Exp $ */
/*********************************************************** /***********************************************************
@ -140,8 +141,8 @@ extern void GetSpritePosition(
int * /*px*/, int * /*px*/,
int * /*py*/); int * /*py*/);
#ifdef PANORAMIX #ifdef XINERAMA
extern int XineramaGetCursorScreen(void); extern int XineramaGetCursorScreen(void);
#endif /* PANORAMIX */ #endif /* XINERAMA */
#endif /* CURSOR_H */ #endif /* CURSOR_H */

View File

@ -1,3 +1,4 @@
/* $XdotOrg: xc/programs/Xserver/include/globals.h,v 1.4 2000/06/28 18:21:22 tsi Exp $ */
/* $XFree86: xc/programs/Xserver/include/globals.h,v 1.4 2000/06/28 18:21:22 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/include/globals.h,v 1.4 2000/06/28 18:21:22 tsi Exp $ */
#ifndef _XSERV_GLOBAL_H_ #ifndef _XSERV_GLOBAL_H_
@ -40,12 +41,12 @@ extern Bool DPMSDisabledSwitch;
extern Bool DPMSCapableFlag; extern Bool DPMSCapableFlag;
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
extern Bool noPanoramiXExtension; extern Bool noXineramaExtension;
extern Bool PanoramiXMapped; extern Bool XineramaMapped;
extern Bool PanoramiXVisibilityNotifySent; extern Bool XineramaVisibilityNotifySent;
extern Bool PanoramiXWindowExposureSent; extern Bool XineramaWindowExposureSent;
extern Bool PanoramiXOneExposeRequest; extern Bool XineramaOneExposeRequest;
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.10 2003/11/10 18:22:49 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.10 2003/11/10 18:22:49 tsi Exp $ */
/*********************************************************** /***********************************************************
@ -67,9 +68,9 @@ SOFTWARE.
#include "globals.h" #include "globals.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
/* /*
@ -425,20 +426,20 @@ miSendExposures(pWin, pRgn, dx, dy)
pe->u.expose.count = i; pe->u.expose.count = i;
} }
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) { if(!noXineramaExtension) {
int scrnum = pWin->drawable.pScreen->myNum; int scrnum = pWin->drawable.pScreen->myNum;
int x = 0, y = 0; int x = 0, y = 0;
XID realWin = 0; XID realWin = 0;
if(!pWin->parent) { if(!pWin->parent) {
x = panoramiXdataPtr[scrnum].x; x = xineramaDataPtr[scrnum].x;
y = panoramiXdataPtr[scrnum].y; y = xineramaDataPtr[scrnum].y;
pWin = WindowTable[0]; pWin = WindowTable[0];
realWin = pWin->drawable.id; realWin = pWin->drawable.id;
} else if (scrnum) { } else if (scrnum) {
PanoramiXRes *win; XineramaRes *win;
win = PanoramiXFindIDByScrnum(XRT_WINDOW, win = XineramaFindIDByScrnum(XRT_WINDOW,
pWin->drawable.id, scrnum); pWin->drawable.id, scrnum);
if(!win) { if(!win) {
DEALLOCATE_LOCAL(pEvent); DEALLOCATE_LOCAL(pEvent);

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.68 2003/01/15 02:34:14 torrey Exp $ */ /* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.68 2003/01/15 02:34:14 torrey Exp $ */
/*********************************************************** /***********************************************************
@ -61,8 +62,8 @@ SOFTWARE.
#undef GLXEXT #undef GLXEXT
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
extern Bool noPanoramiXExtension; extern Bool noXineramaExtension;
#endif #endif
extern Bool noTestExtensions; extern Bool noTestExtensions;
#ifdef XKB #ifdef XKB
@ -102,8 +103,8 @@ typedef void (*InitExtension)(INITARGS);
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include "securstr.h" #include "securstr.h"
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiXproto.h" #include "xineramaProto.h"
#endif #endif
#ifdef XF86BIGFONT #ifdef XF86BIGFONT
#include "xf86bigfstr.h" #include "xf86bigfstr.h"
@ -134,8 +135,8 @@ extern void PexExtensionInit(INITARGS);
#ifdef MULTIBUFFER #ifdef MULTIBUFFER
extern void MultibufferExtensionInit(INITARGS); extern void MultibufferExtensionInit(INITARGS);
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
extern void PanoramiXExtensionInit(INITARGS); extern void XineramaExtensionInit(INITARGS);
#endif #endif
#ifdef XINPUT #ifdef XINPUT
extern void XInputExtensionInit(INITARGS); extern void XInputExtensionInit(INITARGS);
@ -246,9 +247,9 @@ InitExtensions(argc, argv)
int argc; int argc;
char *argv[]; char *argv[];
{ {
#ifdef PANORAMIX #ifdef XINERAMA
# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX) # if !defined(PRINT_ONLY_SERVER) && !defined(NO_XINERAMA)
if (!noPanoramiXExtension) PanoramiXExtensionInit(); if (!noXineramaExtension) XineramaExtensionInit();
# endif # endif
#endif #endif
#ifdef BEZIER #ifdef BEZIER
@ -436,8 +437,8 @@ ExtensionModule extension[] =
{ NULL, "GLX", NULL, NULL }, { NULL, "GLX", NULL, NULL },
{ NULL, "TOG-CUP", NULL, NULL }, { NULL, "TOG-CUP", NULL, NULL },
{ NULL, "Extended-Visual-Information", NULL, NULL }, { NULL, "Extended-Visual-Information", NULL, NULL },
#ifdef PANORAMIX #ifdef XINERAMA
{ NULL, "XINERAMA", &noPanoramiXExtension, NULL }, { NULL, "XINERAMA", &noXineramaExtension, NULL },
#else #else
{ NULL, "NOXINERAMA", NULL, NULL }, { NULL, "NOXINERAMA", NULL, NULL },
#endif #endif
@ -487,8 +488,8 @@ static ExtensionModule staticExtensions[] = {
#ifdef XPRINT #ifdef XPRINT
{ XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
{ PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL }, { XineramaExtensionInit, XINERAMA_PROTOCOL_NAME, &noXineramaExtension, NULL, NULL },
#endif #endif
#ifdef XF86BIGFONT #ifdef XF86BIGFONT
{ XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL }, { XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL },

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* Specialized window functions to protect the alpha channel * Specialized window functions to protect the alpha channel
*/ */
@ -36,9 +37,9 @@
#include "fb.h" #include "fb.h"
#include "safeAlpha.h" #include "safeAlpha.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
/* /*
@ -67,14 +68,14 @@ SafeAlphaFillRegionTiled(
int yRot = pDrawable->y; int yRot = pDrawable->y;
FbBits planeMask; FbBits planeMask;
#ifdef PANORAMIX #ifdef XINERAMA
if(!noPanoramiXExtension) if(!noXineramaExtension)
{ {
int index = pDrawable->pScreen->myNum; int index = pDrawable->pScreen->myNum;
if(&WindowTable[index]->drawable == pDrawable) if(&WindowTable[index]->drawable == pDrawable)
{ {
xRot -= panoramiXdataPtr[index].x; xRot -= xineramaDataPtr[index].x;
yRot -= panoramiXdataPtr[index].y; yRot -= xineramaDataPtr[index].y;
} }
} }
#endif #endif

View File

@ -1,3 +1,4 @@
/* $XdotOrg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */ /* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/* /*
@ -128,12 +129,12 @@ OR PERFORMANCE OF THIS SOFTWARE.
Bool CoreDump; Bool CoreDump;
Bool noTestExtensions; Bool noTestExtensions;
#ifdef PANORAMIX Bool noXineramaExtension = TRUE;
Bool noPanoramiXExtension = TRUE; #ifdef XINERAMA
Bool PanoramiXVisibilityNotifySent = FALSE; Bool XineramaVisibilityNotifySent = FALSE;
Bool PanoramiXMapped = FALSE; Bool XineramaMapped = FALSE;
Bool PanoramiXWindowExposureSent = FALSE; Bool XineramaWindowExposureSent = FALSE;
Bool PanoramiXOneExposeRequest = FALSE; Bool XineramaOneExposeRequest = FALSE;
#endif #endif
int auditTrailLevel = 1; int auditTrailLevel = 1;
@ -536,7 +537,7 @@ void UseMsg(void)
ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-x string loads named extension at init time \n"); ErrorF("-x string loads named extension at init time \n");
ErrorF("-maxbigreqsize set maximal bigrequest size \n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX #ifdef XINERAMA
ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n");
#endif #endif
@ -879,12 +880,12 @@ ProcessCommandLine(int argc, char *argv[])
UseMsg(); UseMsg();
} }
} }
#ifdef PANORAMIX #ifdef XINERAMA
else if ( strcmp( argv[i], "+xinerama") == 0){ else if ( strcmp( argv[i], "+xinerama") == 0){
noPanoramiXExtension = FALSE; noXineramaExtension = FALSE;
} }
else if ( strcmp( argv[i], "-xinerama") == 0){ else if ( strcmp( argv[i], "-xinerama") == 0){
noPanoramiXExtension = TRUE; noXineramaExtension = TRUE;
} }
#endif #endif
else if ( strcmp( argv[i], "-x") == 0) else if ( strcmp( argv[i], "-x") == 0)

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $Xorg: record.c,v 1.4 2001/02/09 02:05:27 xorgcvs Exp $ */ /* $Xorg: record.c,v 1.4 2001/02/09 02:05:27 xorgcvs Exp $ */
/* /*
@ -26,7 +27,7 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization other dealings in this Software without prior written authorization
from The Open Group. from The Open Group.
Author: David P. Wiggins, The Open Group Author: David P. Wiggins, X Consortium, Inc.
This work benefited from earlier work done by Martha Zimet of NCD This work benefited from earlier work done by Martha Zimet of NCD
and Jim Haggerty of Metheus. and Jim Haggerty of Metheus.
@ -48,10 +49,10 @@ and Jim Haggerty of Metheus.
#include "xf86_ansic.h" #include "xf86_ansic.h"
#endif #endif
#ifdef PANORAMIX #ifdef XINERAMA
#include "globals.h" #include "globals.h"
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#include "cursor.h" #include "cursor.h"
#endif #endif
@ -870,10 +871,10 @@ RecordADeviceEvent(pcbl, nulldata, calldata)
{ {
xEvent swappedEvent; xEvent swappedEvent;
xEvent *pEvToRecord = pev; xEvent *pEvToRecord = pev;
#ifdef PANORAMIX #ifdef XINERAMA
xEvent shiftedEvent; xEvent shiftedEvent;
if (!noPanoramiXExtension && if (!noXineramaExtension &&
(pev->u.u.type == MotionNotify || (pev->u.u.type == MotionNotify ||
pev->u.u.type == ButtonPress || pev->u.u.type == ButtonPress ||
pev->u.u.type == ButtonRelease || pev->u.u.type == ButtonRelease ||
@ -882,14 +883,14 @@ RecordADeviceEvent(pcbl, nulldata, calldata)
int scr = XineramaGetCursorScreen(); int scr = XineramaGetCursorScreen();
memcpy(&shiftedEvent, pev, sizeof(xEvent)); memcpy(&shiftedEvent, pev, sizeof(xEvent));
shiftedEvent.u.keyButtonPointer.rootX += shiftedEvent.u.keyButtonPointer.rootX +=
panoramiXdataPtr[scr].x - xineramaDataPtr[scr].x -
panoramiXdataPtr[0].x; xineramaDataPtr[0].x;
shiftedEvent.u.keyButtonPointer.rootY += shiftedEvent.u.keyButtonPointer.rootY +=
panoramiXdataPtr[scr].y - xineramaDataPtr[scr].y -
panoramiXdataPtr[0].y; xineramaDataPtr[0].y;
pEvToRecord = &shiftedEvent; pEvToRecord = &shiftedEvent;
} }
#endif /* PANORAMIX */ #endif /* XINERAMA */
if (pContext->pRecordingClient->swapped) if (pContext->pRecordingClient->swapped)
{ {

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.22 2002/11/23 02:38:15 keithp Exp $ * $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.22 2002/11/23 02:38:15 keithp Exp $
* *
@ -493,9 +494,9 @@ AnimCurInit (ScreenPtr pScreen);
int int
AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor); AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor);
#ifdef PANORAMIX #ifdef XINERAMA
void PanoramiXRenderInit (void); void XineramaRenderInit (void);
void PanoramiXRenderReset (void); void XineramaRenderReset (void);
#endif #endif
#endif /* _PICTURESTR_H_ */ #endif /* _PICTURESTR_H_ */

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* /*
* $XFree86: xc/programs/Xserver/render/render.c,v 1.28 2003/11/03 05:12:02 tsi Exp $ * $XFree86: xc/programs/Xserver/render/render.c,v 1.28 2003/11/03 05:12:02 tsi Exp $
* *
@ -336,8 +337,8 @@ ProcRenderQueryPictFormats (ClientPtr client)
REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq); REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
#ifdef PANORAMIX #ifdef XINERAMA
if (noPanoramiXExtension) if (noXineramaExtension)
numScreens = screenInfo.numScreens; numScreens = screenInfo.numScreens;
else else
numScreens = ((xConnSetup *)ConnectionInfo)->numRoots; numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
@ -2283,9 +2284,9 @@ SProcRenderDispatch (ClientPtr client)
return BadRequest; return BadRequest;
} }
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\ #define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\
pPicture = SecurityLookupIDByType(client, pid, XRT_PICTURE, mode);\ pPicture = SecurityLookupIDByType(client, pid, XRT_PICTURE, mode);\
@ -2303,22 +2304,22 @@ SProcRenderDispatch (ClientPtr client)
} \ } \
} \ } \
int (*PanoramiXSaveRenderVector[RenderNumberRequests])(ClientPtr); int (*XineramaSaveRenderVector[RenderNumberRequests])(ClientPtr);
unsigned long XRT_PICTURE; unsigned long XRT_PICTURE;
static int static int
PanoramiXRenderCreatePicture (ClientPtr client) XineramaRenderCreatePicture (ClientPtr client)
{ {
REQUEST(xRenderCreatePictureReq); REQUEST(xRenderCreatePictureReq);
PanoramiXRes *refDraw, *newPict; XineramaRes *refDraw, *newPict;
int result = Success, j; int result = Success, j;
REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(refDraw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) if(!(newPict = (XineramaRes *) xalloc(sizeof(XineramaRes))))
return BadAlloc; return BadAlloc;
newPict->type = XRT_PICTURE; newPict->type = XRT_PICTURE;
newPict->info[0].id = stuff->pid; newPict->info[0].id = stuff->pid;
@ -2331,13 +2332,13 @@ PanoramiXRenderCreatePicture (ClientPtr client)
else else
newPict->u.pict.root = FALSE; newPict->u.pict.root = FALSE;
for(j = 1; j < PanoramiXNumScreens; j++) for(j = 1; j < XineramaNumScreens; j++)
newPict->info[j].id = FakeClientID(client->index); newPict->info[j].id = FakeClientID(client->index);
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->pid = newPict->info[j].id; stuff->pid = newPict->info[j].id;
stuff->drawable = refDraw->info[j].id; stuff->drawable = refDraw->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client); result = (*XineramaSaveRenderVector[X_RenderCreatePicture]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2350,9 +2351,9 @@ PanoramiXRenderCreatePicture (ClientPtr client)
} }
static int static int
PanoramiXRenderChangePicture (ClientPtr client) XineramaRenderChangePicture (ClientPtr client)
{ {
PanoramiXRes *pict; XineramaRes *pict;
int result = Success, j; int result = Success, j;
REQUEST(xRenderChangePictureReq); REQUEST(xRenderChangePictureReq);
@ -2363,7 +2364,7 @@ PanoramiXRenderChangePicture (ClientPtr client)
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->picture = pict->info[j].id; stuff->picture = pict->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client); result = (*XineramaSaveRenderVector[X_RenderChangePicture]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2371,11 +2372,11 @@ PanoramiXRenderChangePicture (ClientPtr client)
} }
static int static int
PanoramiXRenderSetPictureClipRectangles (ClientPtr client) XineramaRenderSetPictureClipRectangles (ClientPtr client)
{ {
REQUEST(xRenderSetPictureClipRectanglesReq); REQUEST(xRenderSetPictureClipRectanglesReq);
int result = Success, j; int result = Success, j;
PanoramiXRes *pict; XineramaRes *pict;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
@ -2384,7 +2385,7 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->picture = pict->info[j].id; stuff->picture = pict->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles]) (client); result = (*XineramaSaveRenderVector[X_RenderSetPictureClipRectangles]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2392,11 +2393,11 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
} }
static int static int
PanoramiXRenderSetPictureTransform (ClientPtr client) XineramaRenderSetPictureTransform (ClientPtr client)
{ {
REQUEST(xRenderSetPictureTransformReq); REQUEST(xRenderSetPictureTransformReq);
int result = Success, j; int result = Success, j;
PanoramiXRes *pict; XineramaRes *pict;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
@ -2405,7 +2406,7 @@ PanoramiXRenderSetPictureTransform (ClientPtr client)
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->picture = pict->info[j].id; stuff->picture = pict->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client); result = (*XineramaSaveRenderVector[X_RenderSetPictureTransform]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2413,11 +2414,11 @@ PanoramiXRenderSetPictureTransform (ClientPtr client)
} }
static int static int
PanoramiXRenderSetPictureFilter (ClientPtr client) XineramaRenderSetPictureFilter (ClientPtr client)
{ {
REQUEST(xRenderSetPictureFilterReq); REQUEST(xRenderSetPictureFilterReq);
int result = Success, j; int result = Success, j;
PanoramiXRes *pict; XineramaRes *pict;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
@ -2426,7 +2427,7 @@ PanoramiXRenderSetPictureFilter (ClientPtr client)
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->picture = pict->info[j].id; stuff->picture = pict->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client); result = (*XineramaSaveRenderVector[X_RenderSetPictureFilter]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2434,9 +2435,9 @@ PanoramiXRenderSetPictureFilter (ClientPtr client)
} }
static int static int
PanoramiXRenderFreePicture (ClientPtr client) XineramaRenderFreePicture (ClientPtr client)
{ {
PanoramiXRes *pict; XineramaRes *pict;
int result = Success, j; int result = Success, j;
REQUEST(xRenderFreePictureReq); REQUEST(xRenderFreePictureReq);
@ -2450,7 +2451,7 @@ PanoramiXRenderFreePicture (ClientPtr client)
FOR_NSCREENS_BACKWARD(j) { FOR_NSCREENS_BACKWARD(j) {
stuff->picture = pict->info[j].id; stuff->picture = pict->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client); result = (*XineramaSaveRenderVector[X_RenderFreePicture]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2461,9 +2462,9 @@ PanoramiXRenderFreePicture (ClientPtr client)
} }
static int static int
PanoramiXRenderComposite (ClientPtr client) XineramaRenderComposite (ClientPtr client)
{ {
PanoramiXRes *src, *msk, *dst; XineramaRes *src, *msk, *dst;
int result = Success, j; int result = Success, j;
xRenderCompositeReq orig; xRenderCompositeReq orig;
REQUEST(xRenderCompositeReq); REQUEST(xRenderCompositeReq);
@ -2483,25 +2484,25 @@ PanoramiXRenderComposite (ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
if (src->u.pict.root) if (src->u.pict.root)
{ {
stuff->xSrc = orig.xSrc - panoramiXdataPtr[j].x; stuff->xSrc = orig.xSrc - xineramaDataPtr[j].x;
stuff->ySrc = orig.ySrc - panoramiXdataPtr[j].y; stuff->ySrc = orig.ySrc - xineramaDataPtr[j].y;
} }
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
if (dst->u.pict.root) if (dst->u.pict.root)
{ {
stuff->xDst = orig.xDst - panoramiXdataPtr[j].x; stuff->xDst = orig.xDst - xineramaDataPtr[j].x;
stuff->yDst = orig.yDst - panoramiXdataPtr[j].y; stuff->yDst = orig.yDst - xineramaDataPtr[j].y;
} }
if (msk) if (msk)
{ {
stuff->mask = msk->info[j].id; stuff->mask = msk->info[j].id;
if (msk->u.pict.root) if (msk->u.pict.root)
{ {
stuff->xMask = orig.xMask - panoramiXdataPtr[j].x; stuff->xMask = orig.xMask - xineramaDataPtr[j].x;
stuff->yMask = orig.yMask - panoramiXdataPtr[j].y; stuff->yMask = orig.yMask - xineramaDataPtr[j].y;
} }
} }
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client); result = (*XineramaSaveRenderVector[X_RenderComposite]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2509,9 +2510,9 @@ PanoramiXRenderComposite (ClientPtr client)
} }
static int static int
PanoramiXRenderCompositeGlyphs (ClientPtr client) XineramaRenderCompositeGlyphs (ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderCompositeGlyphsReq); REQUEST(xRenderCompositeGlyphsReq);
xGlyphElt origElt, *elt; xGlyphElt origElt, *elt;
@ -2534,16 +2535,16 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
if (src->u.pict.root) if (src->u.pict.root)
{ {
stuff->xSrc = xSrc - panoramiXdataPtr[j].x; stuff->xSrc = xSrc - xineramaDataPtr[j].x;
stuff->ySrc = ySrc - panoramiXdataPtr[j].y; stuff->ySrc = ySrc - xineramaDataPtr[j].y;
} }
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
if (dst->u.pict.root) if (dst->u.pict.root)
{ {
elt->deltax = origElt.deltax - panoramiXdataPtr[j].x; elt->deltax = origElt.deltax - xineramaDataPtr[j].x;
elt->deltay = origElt.deltay - panoramiXdataPtr[j].y; elt->deltay = origElt.deltay - xineramaDataPtr[j].y;
} }
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client); result = (*XineramaSaveRenderVector[stuff->renderReqType]) (client);
if(result != Success) break; if(result != Success) break;
} }
} }
@ -2552,9 +2553,9 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
} }
static int static int
PanoramiXRenderFillRectangles (ClientPtr client) XineramaRenderFillRectangles (ClientPtr client)
{ {
PanoramiXRes *dst; XineramaRes *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderFillRectanglesReq); REQUEST(xRenderFillRectanglesReq);
char *extra; char *extra;
@ -2572,8 +2573,8 @@ PanoramiXRenderFillRectangles (ClientPtr client)
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) if (dst->u.pict.root)
{ {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
xRectangle *rects = (xRectangle *) (stuff + 1); xRectangle *rects = (xRectangle *) (stuff + 1);
@ -2588,7 +2589,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
} }
} }
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client); result = (*XineramaSaveRenderVector[X_RenderFillRectangles]) (client);
if(result != Success) break; if(result != Success) break;
} }
DEALLOCATE_LOCAL(extra); DEALLOCATE_LOCAL(extra);
@ -2598,9 +2599,9 @@ PanoramiXRenderFillRectangles (ClientPtr client)
} }
static int static int
PanoramiXRenderTrapezoids(ClientPtr client) XineramaRenderTrapezoids(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderTrapezoidsReq); REQUEST(xRenderTrapezoidsReq);
char *extra; char *extra;
@ -2622,8 +2623,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
xTrapezoid *trap = (xTrapezoid *) (stuff + 1); xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
@ -2648,7 +2649,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client); (*XineramaSaveRenderVector[X_RenderTrapezoids]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2660,9 +2661,9 @@ PanoramiXRenderTrapezoids(ClientPtr client)
} }
static int static int
PanoramiXRenderTriangles(ClientPtr client) XineramaRenderTriangles(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderTrianglesReq); REQUEST(xRenderTrianglesReq);
char *extra; char *extra;
@ -2684,8 +2685,8 @@ PanoramiXRenderTriangles(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
xTriangle *tri = (xTriangle *) (stuff + 1); xTriangle *tri = (xTriangle *) (stuff + 1);
@ -2706,7 +2707,7 @@ PanoramiXRenderTriangles(ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderTriangles]) (client); (*XineramaSaveRenderVector[X_RenderTriangles]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2718,9 +2719,9 @@ PanoramiXRenderTriangles(ClientPtr client)
} }
static int static int
PanoramiXRenderTriStrip(ClientPtr client) XineramaRenderTriStrip(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderTriStripReq); REQUEST(xRenderTriStripReq);
char *extra; char *extra;
@ -2742,8 +2743,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1); xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@ -2760,7 +2761,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client); (*XineramaSaveRenderVector[X_RenderTriStrip]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2772,9 +2773,9 @@ PanoramiXRenderTriStrip(ClientPtr client)
} }
static int static int
PanoramiXRenderTriFan(ClientPtr client) XineramaRenderTriFan(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderTriFanReq); REQUEST(xRenderTriFanReq);
char *extra; char *extra;
@ -2796,8 +2797,8 @@ PanoramiXRenderTriFan(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1); xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@ -2814,7 +2815,7 @@ PanoramiXRenderTriFan(ClientPtr client)
stuff->src = src->info[j].id; stuff->src = src->info[j].id;
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderTriFan]) (client); (*XineramaSaveRenderVector[X_RenderTriFan]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2828,9 +2829,9 @@ PanoramiXRenderTriFan(ClientPtr client)
#if 0 /* Not implemented yet */ #if 0 /* Not implemented yet */
static int static int
PanoramiXRenderColorTrapezoids(ClientPtr client) XineramaRenderColorTrapezoids(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderColorTrapezoidsReq); REQUEST(xRenderColorTrapezoidsReq);
char *extra; char *extra;
@ -2850,8 +2851,8 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
....; ....;
@ -2860,7 +2861,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderColorTrapezoids]) (client); (*XineramaSaveRenderVector[X_RenderColorTrapezoids]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2872,9 +2873,9 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
} }
static int static int
PanoramiXRenderColorTriangles(ClientPtr client) XineramaRenderColorTriangles(ClientPtr client)
{ {
PanoramiXRes *src, *dst; XineramaRes *src, *dst;
int result = Success, j; int result = Success, j;
REQUEST(xRenderColorTrianglesReq); REQUEST(xRenderColorTrianglesReq);
char *extra; char *extra;
@ -2894,8 +2895,8 @@ PanoramiXRenderColorTriangles(ClientPtr client)
FOR_NSCREENS_FORWARD(j) { FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len); if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) { if (dst->u.pict.root) {
int x_off = panoramiXdataPtr[j].x; int x_off = xineramaDataPtr[j].x;
int y_off = panoramiXdataPtr[j].y; int y_off = xineramaDataPtr[j].y;
if(x_off || y_off) { if(x_off || y_off) {
....; ....;
@ -2904,7 +2905,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
stuff->dst = dst->info[j].id; stuff->dst = dst->info[j].id;
result = result =
(*PanoramiXSaveRenderVector[X_RenderColorTriangles]) (client); (*XineramaSaveRenderVector[X_RenderColorTriangles]) (client);
if(result != Success) break; if(result != Success) break;
} }
@ -2918,40 +2919,40 @@ PanoramiXRenderColorTriangles(ClientPtr client)
#endif #endif
void void
PanoramiXRenderInit (void) XineramaRenderInit (void)
{ {
int i; int i;
XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource); XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource);
for (i = 0; i < RenderNumberRequests; i++) for (i = 0; i < RenderNumberRequests; i++)
PanoramiXSaveRenderVector[i] = ProcRenderVector[i]; XineramaSaveRenderVector[i] = ProcRenderVector[i];
/* /*
* Stuff in Xinerama aware request processing hooks * Stuff in Xinerama aware request processing hooks
*/ */
ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture; ProcRenderVector[X_RenderCreatePicture] = XineramaRenderCreatePicture;
ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture; ProcRenderVector[X_RenderChangePicture] = XineramaRenderChangePicture;
ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform; ProcRenderVector[X_RenderSetPictureTransform] = XineramaRenderSetPictureTransform;
ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter; ProcRenderVector[X_RenderSetPictureFilter] = XineramaRenderSetPictureFilter;
ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles; ProcRenderVector[X_RenderSetPictureClipRectangles] = XineramaRenderSetPictureClipRectangles;
ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture; ProcRenderVector[X_RenderFreePicture] = XineramaRenderFreePicture;
ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite; ProcRenderVector[X_RenderComposite] = XineramaRenderComposite;
ProcRenderVector[X_RenderCompositeGlyphs8] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderCompositeGlyphs8] = XineramaRenderCompositeGlyphs;
ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderCompositeGlyphs16] = XineramaRenderCompositeGlyphs;
ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderCompositeGlyphs32] = XineramaRenderCompositeGlyphs;
ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles; ProcRenderVector[X_RenderFillRectangles] = XineramaRenderFillRectangles;
ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids; ProcRenderVector[X_RenderTrapezoids] = XineramaRenderTrapezoids;
ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles; ProcRenderVector[X_RenderTriangles] = XineramaRenderTriangles;
ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip; ProcRenderVector[X_RenderTriStrip] = XineramaRenderTriStrip;
ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan; ProcRenderVector[X_RenderTriFan] = XineramaRenderTriFan;
} }
void void
PanoramiXRenderReset (void) XineramaRenderReset (void)
{ {
int i; int i;
for (i = 0; i < RenderNumberRequests; i++) for (i = 0; i < RenderNumberRequests; i++)
ProcRenderVector[i] = PanoramiXSaveRenderVector[i]; ProcRenderVector[i] = XineramaSaveRenderVector[i];
} }
#endif /* PANORAMIX */ #endif /* XINERAMA */

View File

@ -1,3 +1,4 @@
/* $XdotOrg$ */
/* $Xorg: ddxFakeMtn.c,v 1.3 2000/08/17 19:53:45 cpqbld Exp $ */ /* $Xorg: ddxFakeMtn.c,v 1.3 2000/08/17 19:53:45 cpqbld Exp $ */
/************************************************************ /************************************************************
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
@ -37,9 +38,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBsrv.h" #include "XKBsrv.h"
#include "XI.h" #include "XI.h"
#ifdef PANORAMIX #ifdef XINERAMA
#include "panoramiX.h" #include "xinerama.h"
#include "panoramiXsrv.h" #include "xineramaSrv.h"
#endif #endif
#include "mipointer.h" #include "mipointer.h"
@ -54,8 +55,8 @@ ScreenPtr pScreen, oldScreen;
GetSpritePosition(&oldX, &oldY); GetSpritePosition(&oldX, &oldY);
pScreen = oldScreen = GetSpriteWindow()->drawable.pScreen; pScreen = oldScreen = GetSpriteWindow()->drawable.pScreen;
#ifdef PANORAMIX #ifdef XINERAMA
if (!noPanoramiXExtension) { if (!noXineramaExtension) {
BoxRec box; BoxRec box;
int i; int i;
@ -92,8 +93,8 @@ ScreenPtr pScreen, oldScreen;
} }
} }
} }
oldX -= panoramiXdataPtr[pScreen->myNum].x; oldX -= xineramaDataPtr[pScreen->myNum].x;
oldY -= panoramiXdataPtr[pScreen->myNum].y; oldY -= xineramaDataPtr[pScreen->myNum].y;
} }
else else
#endif #endif