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.
parent 8a7481a2
/* $XdotOrg$ */
/* $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
......@@ -76,9 +77,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h>
#include "colormapst.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#include "cursor.h"
#endif
......@@ -1558,8 +1559,8 @@ void XETrapStampAndMail(xEvent *x_event)
/* Copy the event information into our local memory */
(void)memcpy(&(data.u.event),x_event,sizeof(xEvent));
#ifdef PANORAMIX
if (!noPanoramiXExtension &&
#ifdef XINERAMA
if (!noXineramaExtension &&
(data.u.event.u.u.type == MotionNotify ||
data.u.event.u.u.type == ButtonPress ||
data.u.event.u.u.type == ButtonRelease ||
......@@ -1567,9 +1568,9 @@ void XETrapStampAndMail(xEvent *x_event)
data.u.event.u.u.type == KeyRelease)) {
int scr = XineramaGetCursorScreen();
data.u.event.u.keyButtonPointer.rootX +=
panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x;
xineramaDataPtr[scr].x - xineramaDataPtr[0].x;
data.u.event.u.keyButtonPointer.rootY +=
panoramiXdataPtr[scr].y - panoramiXdataPtr[0].y;
xineramaDataPtr[scr].y - xineramaDataPtr[0].y;
}
#endif
......
/* $XdotOrg$ */
/*
* $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 "cursorstr.h"
#include "colormapst.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#endif
......@@ -676,8 +677,8 @@ ScreenSaverHandle (pScreen, xstate, force)
ret = TRUE;
}
#ifdef PANORAMIX
if(noPanoramiXExtension || !pScreen->myNum)
#ifdef XINERAMA
if(noXineramaExtension || !pScreen->myNum)
#endif
SendScreenSaverNotify (pScreen, state, force);
return ret;
......@@ -1194,20 +1195,20 @@ ScreenSaverUnsetAttributes (ClientPtr client)
static int
ProcScreenSaverSetAttributes (ClientPtr client)
{
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
#ifdef XINERAMA
if(!noXineramaExtension) {
REQUEST(xScreenSaverSetAttributesReq);
PanoramiXRes *draw;
PanoramiXRes *backPix = NULL;
PanoramiXRes *bordPix = NULL;
PanoramiXRes *cmap = NULL;
XineramaRes *draw;
XineramaRes *backPix = NULL;
XineramaRes *bordPix = NULL;
XineramaRes *cmap = NULL;
int i, status = 0, len;
int pback_offset = 0, pbord_offset = 0, cmap_offset = 0;
XID orig_visual, tmp;
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable;
......@@ -1219,7 +1220,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
pback_offset = Ones((Mask)stuff->mask & (CWBackPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
if(!(backPix = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap;
}
......@@ -1229,7 +1230,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
pbord_offset = Ones((Mask)stuff->mask & (CWBorderPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
if(!(bordPix = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap;
}
......@@ -1239,7 +1240,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
cmap_offset = Ones((Mask)stuff->mask & (CWColormap - 1));
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
if(!(cmap = (XineramaRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess)))
return BadColor;
}
......@@ -1258,7 +1259,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
if (orig_visual != CopyFromParent)
stuff->visualID =
PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i];
XineramaVisualTable[(orig_visual*MAXSCREENS) + i];
status = ScreenSaverSetAttributes(client);
}
......@@ -1273,17 +1274,17 @@ ProcScreenSaverSetAttributes (ClientPtr client)
static int
ProcScreenSaverUnsetAttributes (ClientPtr client)
{
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
#ifdef XINERAMA
if(!noXineramaExtension) {
REQUEST(xScreenSaverUnsetAttributesReq);
PanoramiXRes *draw;
XineramaRes *draw;
int i;
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable;
for(i = PanoramiXNumScreens - 1; i > 0; i--) {
for(i = XineramaNumScreens - 1; i > 0; i--) {
stuff->drawable = draw->info[i].id;
ScreenSaverUnsetAttributes(client);
}
......
/* $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 $ */
/************************************************************
......@@ -112,9 +113,9 @@ static DISPATCH_PROC(SProcShapeQueryVersion);
static DISPATCH_PROC(SProcShapeRectangles);
static DISPATCH_PROC(SProcShapeSelectInput);
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#endif
#if 0
......@@ -375,18 +376,18 @@ ProcShapeRectangles (client)
stuff->xOff, stuff->yOff, createDefault);
}
#ifdef PANORAMIX
#ifdef XINERAMA
static int
ProcPanoramiXShapeRectangles(
ProcXineramaShapeRectangles(
register ClientPtr client)
{
REQUEST(xShapeRectanglesReq);
PanoramiXRes *win;
XineramaRes *win;
int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow;
......@@ -464,23 +465,23 @@ ProcShapeMask (client)
stuff->xOff, stuff->yOff, createDefault);
}
#ifdef PANORAMIX
#ifdef XINERAMA
static int
ProcPanoramiXShapeMask(
ProcXineramaShapeMask(
register ClientPtr client)
{
REQUEST(xShapeMaskReq);
PanoramiXRes *win, *pmap;
XineramaRes *win, *pmap;
int j, result = 0;
REQUEST_SIZE_MATCH (xShapeMaskReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow;
if(stuff->src != None) {
if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
if(!(pmap = (XineramaRes *)SecurityLookupIDByType(
client, stuff->src, XRT_PIXMAP, SecurityReadAccess)))
return BadPixmap;
} else
......@@ -579,22 +580,22 @@ ProcShapeCombine (client)
}
#ifdef PANORAMIX
#ifdef XINERAMA
static int
ProcPanoramiXShapeCombine(
ProcXineramaShapeCombine(
register ClientPtr client)
{
REQUEST(xShapeCombineReq);
PanoramiXRes *win, *win2;
XineramaRes *win, *win2;
int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeCombineReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow;
if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType(
if(!(win2 = (XineramaRes *)SecurityLookupIDByType(
client, stuff->src, XRT_WINDOW, SecurityReadAccess)))
return BadWindow;
......@@ -648,18 +649,18 @@ ProcShapeOffset (client)
}
#ifdef PANORAMIX
#ifdef XINERAMA
static int
ProcPanoramiXShapeOffset(
ProcXineramaShapeOffset(
register ClientPtr client)
{
REQUEST(xShapeOffsetReq);
PanoramiXRes *win;
XineramaRes *win;
int j, result = 0;
REQUEST_AT_LEAST_SIZE (xShapeOffsetReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
if(!(win = (XineramaRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
return BadWindow;
......@@ -1064,30 +1065,30 @@ ProcShapeDispatch (client)
case X_ShapeQueryVersion:
return ProcShapeQueryVersion (client);
case X_ShapeRectangles:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeRectangles (client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShapeRectangles (client);
else
#endif
return ProcShapeRectangles (client);
case X_ShapeMask:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeMask (client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShapeMask (client);
else
#endif
return ProcShapeMask (client);
case X_ShapeCombine:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeCombine (client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShapeCombine (client);
else
#endif
return ProcShapeCombine (client);
case X_ShapeOffset:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShapeOffset (client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShapeOffset (client);
else
#endif
return ProcShapeOffset (client);
......
/* $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 $ */
/************************************************************
......@@ -62,9 +63,9 @@ in this Software without prior written authorization from The Open Group.
#include "xf86_ansic.h"
#endif
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#endif
#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
ProcPanoramiXShmPutImage(register ClientPtr client)
ProcXineramaShmPutImage(register ClientPtr client)
{
int j, result = 0, orig_x, orig_y;
PanoramiXRes *draw, *gc;
XineramaRes *draw, *gc;
Bool sendEvent, isRoot;
REQUEST(xShmPutImageReq);
REQUEST_SIZE_MATCH(xShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
if(!(gc = (XineramaRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
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_y = stuff->dstY;
......@@ -590,8 +592,8 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
stuff->drawable = draw->info[j].id;
stuff->gc = gc->info[j].id;
if (isRoot) {
stuff->dstX = orig_x - panoramiXdataPtr[j].x;
stuff->dstY = orig_y - panoramiXdataPtr[j].y;
stuff->dstX = orig_x - xineramaDataPtr[j].x;
stuff->dstY = orig_y - xineramaDataPtr[j].y;
}
result = ProcShmPutImage(client);
if(result != client->noClientException) break;
......@@ -600,9 +602,9 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
}
static int
ProcPanoramiXShmGetImage(ClientPtr client)
ProcXineramaShmGetImage(ClientPtr client)
{
PanoramiXRes *draw;
XineramaRes *draw;
DrawablePtr drawables[MAXSCREENS];
DrawablePtr pDraw;
xShmGetImageReply xgi;
......@@ -621,7 +623,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return(BadValue);
}
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
return BadDrawable;
......@@ -639,19 +641,20 @@ ProcPanoramiXShmGetImage(ClientPtr client)
format = stuff->format;
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( /* check for being onscreen */
x < 0 || x + w > PanoramiXPixWidth ||
y < 0 || y + h > PanoramiXPixHeight )
x < 0 || x + w > XineramaPixWidth ||
y < 0 || y + h > XineramaPixHeight )
return(BadMatch);
} else {
if( /* check for being onscreen */
panoramiXdataPtr[0].x + pDraw->x + x < 0 ||
panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth ||
panoramiXdataPtr[0].y + pDraw->y + y < 0 ||
panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight ||
xineramaDataPtr[0].x + pDraw->x + x < 0 ||
xineramaDataPtr[0].x + pDraw->x + x + w > XineramaPixWidth ||
xineramaDataPtr[0].y + pDraw->y + y < 0 ||
xineramaDataPtr[0].y + pDraw->y + y + h > XineramaPixHeight ||
/* check for being inside of border */
x < - wBorderWidth((WindowPtr)pDraw) ||
x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width ||
......@@ -661,7 +664,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
}
drawables[0] = pDraw;
for(i = 1; i < PanoramiXNumScreens; i++)
for(i = 1; i < XineramaNumScreens; i++)
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
xgi.visual = wVisual(((WindowPtr)pDraw));
......@@ -714,7 +717,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
}
static int
ProcPanoramiXShmCreatePixmap(
ProcXineramaShmCreatePixmap(
register ClientPtr client)
{
ScreenPtr pScreen = NULL;
......@@ -724,7 +727,7 @@ ProcPanoramiXShmCreatePixmap(
int i, j, result;
ShmDescPtr shmdesc;
REQUEST(xShmCreatePixmapReq);
PanoramiXRes *newPix;
XineramaRes *newPix;
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
client->errorValue = stuff->pid;
......@@ -752,13 +755,13 @@ CreatePmap:
PixmapBytePad(stuff->width, stuff->depth) * stuff->height,
client);
if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
if(!(newPix = (XineramaRes *) xalloc(sizeof(XineramaRes))))
return BadAlloc;
newPix->type = XRT_PIXMAP;
newPix->u.pix.shared = TRUE;
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);
result = (client->noClientException);
......@@ -1080,8 +1083,10 @@ CreatePmap:
shmdesc->addr + stuff->offset);
if (pMap)
{
#ifdef NO_XINERAMA_PORT
#ifdef PIXPRIV
pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc;
#endif
#endif
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
......@@ -1108,21 +1113,21 @@ ProcShmDispatch (client)
case X_ShmDetach:
return ProcShmDetach(client);
case X_ShmPutImage:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShmPutImage(client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShmPutImage(client);
#endif
return ProcShmPutImage(client);
case X_ShmGetImage:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShmGetImage(client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShmGetImage(client);
#endif
return ProcShmGetImage(client);
case X_ShmCreatePixmap:
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcPanoramiXShmCreatePixmap(client);
#ifdef XINERAMA
if ( !noXineramaExtension )
return ProcXineramaShmCreatePixmap(client);
#endif
return ProcShmCreatePixmap(client);
default:
......
/* $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 $ */
/*
......@@ -63,9 +64,9 @@ static unsigned char XTestReqCode;
extern int DeviceValuator;
#endif /* XINPUT */
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#endif
static void XTestResetProc(
......@@ -390,13 +391,13 @@ ProcXTestFakeInput(client)
return BadValue;
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
#ifdef XINERAMA
if (!noXineramaExtension) {
ScreenPtr pScreen = root->drawable.pScreen;
BoxRec box;
int i;
int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x;
int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y;
int x = ev->u.keyButtonPointer.rootX + xineramaDataPtr[0].x;
int y = ev->u.keyButtonPointer.rootY + xineramaDataPtr[0].y;
if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
x, y, &box)) {
FOR_NSCREENS(i) {
......@@ -405,8 +406,8 @@ ProcXTestFakeInput(client)
&XineramaScreenRegions[i],
x, y, &box)) {
root = WindowTable[i];
x -= panoramiXdataPtr[i].x;
y -= panoramiXdataPtr[i].y;
x -= xineramaDataPtr[i].x;
y -= xineramaDataPtr[i].y;
ev->u.keyButtonPointer.rootX = x;
ev->u.keyButtonPointer.rootY = y;
break;
......@@ -425,10 +426,10 @@ ProcXTestFakeInput(client)
else if (ev->u.keyButtonPointer.rootY >= root->drawable.height)
ev->u.keyButtonPointer.rootY = root->drawable.height - 1;
#ifdef PANORAMIX
if ((!noPanoramiXExtension
#ifdef XINERAMA
if ((!noXineramaExtension
&& root->drawable.pScreen->myNum != XineramaGetCursorScreen())
|| (noPanoramiXExtension && root != GetCurrentRootWindow()))
|| (noXineramaExtension && root != GetCurrentRootWindow()))
#else
if (root != GetCurrentRootWindow())
......
This diff is collapsed.
/* $XdotOrg$ */
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
......@@ -98,9 +99,9 @@ SOFTWARE.
#include "xf86_ansic.h"
#endif
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
#include "xvdisp.h"
#endif
......@@ -171,7 +172,7 @@ XvExtensionInit()
ErrorF("XvExtensionInit: Unable to allocate screen private index\n");
return;
}
#ifdef PANORAMIX
#ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif
XvScreenGeneration = serverGeneration;
......@@ -270,7 +271,7 @@ XvScreenInit(ScreenPtr pScreen)
ErrorF("XvScreenInit: Unable to allocate screen private index\n");
return BadAlloc;
}
#ifdef PANORAMIX
#ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif
XvScreenGeneration = serverGeneration;
......
/* $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 $ */
/***********************************************************
......@@ -58,9 +59,11 @@ SOFTWARE.
#include "cfbmskbits.h"
#include "mi.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#ifdef XINERAMA
#include "xinerama.h"
#include "xineramaSrv.h"
extern Bool noXineramaExtension;
extern WindowPtr *WindowTable;
#endif
void
......@@ -97,14 +100,16 @@ cfbPaintWindow(pWin, pRegion, what)
}
else
{
#ifndef NO_XINERAMA_PORT
int xorg = pWin->drawable.x;
int yorg = pWin->drawable.y;
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
#endif
#ifdef XINERAMA
if(!noXineramaExtension) {
int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pWin) {
xorg -= panoramiXdataPtr[index].x;
yorg -= panoramiXdataPtr[index].y;
xorg -= xineramaDataPtr[index].x;
yorg -= xineramaDataPtr[index].y;
}
}
#endif
......@@ -112,7 +117,11 @@ cfbPaintWindow(pWin, pRegion, what)
(int)REGION_NUM_RECTS(pRegion),