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:
parent
8a7481a274
commit
4b75c7f635
|
@ -1,3 +1,4 @@
|
|||
/* $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
|
||||
|
||||
|
|
43
Xext/saver.c
43
Xext/saver.c
|
@ -1,3 +1,4 @@
|
|||
/* $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);
|
||||
}
|
||||
|
|
67
Xext/shape.c
67
Xext/shape.c
|
@ -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 $ */
|
||||
/************************************************************
|
||||
|
||||
|
@ -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);
|
||||
|
|
75
Xext/shm.c
75
Xext/shm.c
|
@ -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 $ */
|
||||
/************************************************************
|
||||
|
||||
|
@ -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:
|
||||
|
|
25
Xext/xtest.c
25
Xext/xtest.c
|
@ -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 $ */
|
||||
/*
|
||||
|
||||
|
@ -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())
|
||||
|
|
111
Xext/xvdisp.c
111
Xext/xvdisp.c
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
|
||||
|
@ -72,9 +73,9 @@ SOFTWARE.
|
|||
|
||||
#include "xvdisp.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
|
||||
unsigned long XvXRTPort;
|
||||
|
||||
|
@ -232,15 +233,15 @@ ProcXvDispatch(ClientPtr client)
|
|||
case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client));
|
||||
case xv_QueryEncodings: return(ProcXvQueryEncodings(client));
|
||||
case xv_PutVideo:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvPutVideo(client));
|
||||
else
|
||||
#endif
|
||||
return(ProcXvPutVideo(client));
|
||||
case xv_PutStill:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvPutStill(client));
|
||||
else
|
||||
#endif
|
||||
|
@ -252,15 +253,15 @@ ProcXvDispatch(ClientPtr client)
|
|||
case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client));
|
||||
case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client));
|
||||
case xv_StopVideo:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvStopVideo(client));
|
||||
else
|
||||
#endif
|
||||
return(ProcXvStopVideo(client));
|
||||
case xv_SetPortAttribute:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvSetPortAttribute(client));
|
||||
else
|
||||
#endif
|
||||
|
@ -269,16 +270,16 @@ ProcXvDispatch(ClientPtr client)
|
|||
case xv_QueryBestSize: return(ProcXvQueryBestSize(client));
|
||||
case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client));
|
||||
case xv_PutImage:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvPutImage(client));
|
||||
else
|
||||
#endif
|
||||
return(ProcXvPutImage(client));
|
||||
#ifdef MITSHM
|
||||
case xv_ShmPutImage:
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return(XineramaXvShmPutImage(client));
|
||||
else
|
||||
#endif
|
||||
|
@ -1862,7 +1863,7 @@ SWriteListImageFormatsReply(
|
|||
}
|
||||
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
|
||||
|
||||
|
||||
|
@ -1871,15 +1872,15 @@ static int
|
|||
XineramaXvStopVideo(ClientPtr client)
|
||||
{
|
||||
int result = Success, i;
|
||||
PanoramiXRes *draw, *port;
|
||||
XineramaRes *draw, *port;
|
||||
REQUEST(xvStopVideoReq);
|
||||
REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||
|
||||
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
|
||||
if(!(draw = (XineramaRes *)SecurityLookupIDByClass(
|
||||
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
|
||||
return BadDrawable;
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
return _XvBadPort;
|
||||
|
||||
|
@ -1898,12 +1899,12 @@ static int
|
|||
XineramaXvSetPortAttribute(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvSetPortAttributeReq);
|
||||
PanoramiXRes *port;
|
||||
XineramaRes *port;
|
||||
int result = Success, i;
|
||||
|
||||
REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
return _XvBadPort;
|
||||
|
||||
|
@ -1922,26 +1923,27 @@ static int
|
|||
XineramaXvShmPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvShmPutImageReq);
|
||||
PanoramiXRes *draw, *gc, *port;
|
||||
XineramaRes *draw, *gc, *port;
|
||||
Bool send_event = stuff->send_event;
|
||||
Bool isRoot;
|
||||
int result = Success, i, x, y;
|
||||
|
||||
REQUEST_SIZE_MATCH(xvShmPutImageReq);
|
||||
|
||||
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;
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
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;
|
||||
y = stuff->drw_y;
|
||||
|
@ -1954,8 +1956,8 @@ XineramaXvShmPutImage(ClientPtr client)
|
|||
stuff->drw_x = x;
|
||||
stuff->drw_y = y;
|
||||
if(isRoot) {
|
||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
||||
stuff->drw_x -= xineramaDataPtr[i].x;
|
||||
stuff->drw_y -= xineramaDataPtr[i].y;
|
||||
}
|
||||
stuff->send_event = (send_event && !i) ? 1 : 0;
|
||||
|
||||
|
@ -1970,25 +1972,26 @@ static int
|
|||
XineramaXvPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutImageReq);
|
||||
PanoramiXRes *draw, *gc, *port;
|
||||
XineramaRes *draw, *gc, *port;
|
||||
Bool isRoot;
|
||||
int result = Success, i, x, y;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
||||
|
||||
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;
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
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;
|
||||
y = stuff->drw_y;
|
||||
|
@ -2001,8 +2004,8 @@ XineramaXvPutImage(ClientPtr client)
|
|||
stuff->drw_x = x;
|
||||
stuff->drw_y = y;
|
||||
if(isRoot) {
|
||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
||||
stuff->drw_x -= xineramaDataPtr[i].x;
|
||||
stuff->drw_y -= xineramaDataPtr[i].y;
|
||||
}
|
||||
|
||||
result = ProcXvPutImage(client);
|
||||
|
@ -2015,25 +2018,26 @@ static int
|
|||
XineramaXvPutVideo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutImageReq);
|
||||
PanoramiXRes *draw, *gc, *port;
|
||||
XineramaRes *draw, *gc, *port;
|
||||
Bool isRoot;
|
||||
int result = Success, i, x, y;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xvPutVideoReq);
|
||||
|
||||
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;
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
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;
|
||||
y = stuff->drw_y;
|
||||
|
@ -2046,8 +2050,8 @@ XineramaXvPutVideo(ClientPtr client)
|
|||
stuff->drw_x = x;
|
||||
stuff->drw_y = y;
|
||||
if(isRoot) {
|
||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
||||
stuff->drw_x -= xineramaDataPtr[i].x;
|
||||
stuff->drw_y -= xineramaDataPtr[i].y;
|
||||
}
|
||||
|
||||
result = ProcXvPutVideo(client);
|
||||
|
@ -2060,25 +2064,26 @@ static int
|
|||
XineramaXvPutStill(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutImageReq);
|
||||
PanoramiXRes *draw, *gc, *port;
|
||||
XineramaRes *draw, *gc, *port;
|
||||
Bool isRoot;
|
||||
int result = Success, i, x, y;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
||||
|
||||
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;
|
||||
|
||||
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
if(!(port = (XineramaRes *)SecurityLookupIDByType(
|
||||
client, stuff->port, XvXRTPort, SecurityReadAccess)))
|
||||
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;
|
||||
y = stuff->drw_y;
|
||||
|
@ -2091,8 +2096,8 @@ XineramaXvPutStill(ClientPtr client)
|
|||
stuff->drw_x = x;
|
||||
stuff->drw_y = y;
|
||||
if(isRoot) {
|
||||
stuff->drw_x -= panoramiXdataPtr[i].x;
|
||||
stuff->drw_y -= panoramiXdataPtr[i].y;
|
||||
stuff->drw_x -= xineramaDataPtr[i].x;
|
||||
stuff->drw_y -= xineramaDataPtr[i].y;
|
||||
}
|
||||
|
||||
result = ProcXvPutStill(client);
|
||||
|
@ -2110,7 +2115,7 @@ void XineramifyXv(void)
|
|||
XvAttributePtr pAttr;
|
||||
XvScreenPtr xvsp;
|
||||
Bool isOverlay, hasOverlay;
|
||||
PanoramiXRes *port;
|
||||
XineramaRes *port;
|
||||
XvAdaptorPtr MatchingAdaptors[MAXSCREENS];
|
||||
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];
|
||||
xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr;
|
||||
|
||||
|
@ -2194,12 +2199,12 @@ void XineramifyXv(void)
|
|||
|
||||
/* now create a resource for each port */
|
||||
for(j = 0; j < refAdapt->nPorts; j++) {
|
||||
if(!(port = xalloc(sizeof(PanoramiXRes))))
|
||||
if(!(port = xalloc(sizeof(XineramaRes))))
|
||||
break;
|
||||
port->info[0].id = MatchingAdaptors[0]->base_id + j;
|
||||
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))
|
||||
port->info[k].id = MatchingAdaptors[k]->base_id + j;
|
||||
else
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $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;
|
||||
|
|
|
@ -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 $ */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -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),
|
||||
REGION_RECTS(pRegion),
|
||||
pWin->background.pixmap,
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
xorg, yorg);
|
||||
#else
|
||||
(int)pWin->drawable.x, (int)pWin->drawable.y);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case BackgroundPixel:
|
||||
|
@ -140,21 +149,25 @@ cfbPaintWindow(pWin, pRegion, what)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
int xorg, yorg;
|
||||
#endif
|
||||
|
||||
for (pBgWin = pWin;
|
||||
pBgWin->backgroundState == ParentRelative;
|
||||
pBgWin = pBgWin->parent);
|
||||
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
xorg = pBgWin->drawable.x;
|
||||
yorg = pBgWin->drawable.y;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
int index = pWin->drawable.pScreen->myNum;
|
||||
if(WindowTable[index] == pBgWin) {
|
||||
xorg -= panoramiXdataPtr[index].x;
|
||||
yorg -= panoramiXdataPtr[index].y;
|
||||
xorg -= xineramaDataPtr[index].x;
|
||||
yorg -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -163,7 +176,12 @@ cfbPaintWindow(pWin, pRegion, what)
|
|||
(int)REGION_NUM_RECTS(pRegion),
|
||||
REGION_RECTS(pRegion),
|
||||
pWin->border.pixmap,
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
xorg, yorg);
|
||||
#else
|
||||
(int) pBgWin->drawable.x,
|
||||
(int) pBgWin->drawable.y);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -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 $ */
|
||||
/******************************************************************************
|
||||
*
|
||||
|
@ -1820,8 +1821,9 @@ DbeExtensionInit()
|
|||
int nStubbedScreens = 0;
|
||||
Bool ddxInitSuccess;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) return;
|
||||
#ifdef XINERAMA
|
||||
extern Bool noXineramaExtension;
|
||||
if(!noXineramaExtension) return;
|
||||
#endif
|
||||
|
||||
/* Allocate private pointers in windows and screens. */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.12 2003/11/17 22:20:33 dawes Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -61,6 +62,11 @@ SOFTWARE.
|
|||
#ifdef LBX
|
||||
#include "lbxserve.h"
|
||||
#endif
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
extern Bool noXineramaExtension;
|
||||
#endif
|
||||
|
||||
extern XID clientErrorValue;
|
||||
extern int colormapPrivateCount;
|
||||
|
@ -474,16 +480,23 @@ TellNoMap (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 */
|
||||
xE.u.u.type = ColormapNotify;
|
||||
xE.u.colormap.window = pwin->drawable.id;
|
||||
xE.u.colormap.colormap = None;
|
||||
xE.u.colormap.new = TRUE;
|
||||
xE.u.colormap.state = ColormapUninstalled;
|
||||
#ifdef PANORAMIX
|
||||
if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum)
|
||||
#endif
|
||||
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
|
||||
#ifdef XINERAMA
|
||||
}
|
||||
#endif
|
||||
if (pwin->optional) {
|
||||
pwin->optional->colormap = None;
|
||||
CheckWindowOptionalNeed (pwin);
|
||||
|
@ -502,9 +515,12 @@ TellLostMap (pwin, value)
|
|||
Colormap *pmid = (Colormap *)value;
|
||||
xEvent xE;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
|
||||
return WT_STOPWALKING;
|
||||
#ifdef XINERAMA
|
||||
/*
|
||||
* Only deliver event for Screen 0 when Xinerama enabled
|
||||
*/
|
||||
if (noXineramaExtension ||
|
||||
(!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
|
||||
#endif
|
||||
if (wColormap(pwin) == *pmid)
|
||||
{
|
||||
|
@ -529,9 +545,12 @@ TellGainedMap (pwin, value)
|
|||
Colormap *pmid = (Colormap *)value;
|
||||
xEvent xE;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
|
||||
return WT_STOPWALKING;
|
||||
#ifdef XINERAMA
|
||||
/*
|
||||
* Only deliver event for Screen 0 when Xinerama enabled
|
||||
*/
|
||||
if (noXineramaExtension ||
|
||||
(!noXineramaExtension && !(pwin->drawable.pScreen->myNum)))
|
||||
#endif
|
||||
if (wColormap (pwin) == *pmid)
|
||||
{
|
||||
|
|
|
@ -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 $ */
|
||||
/************************************************************
|
||||
|
||||
|
@ -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 *
|
||||
|
@ -70,7 +71,7 @@ SOFTWARE.
|
|||
|
||||
/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.33 2003/11/17 22:20:33 dawes Exp $ */
|
||||
|
||||
#ifdef PANORAMIX_DEBUG
|
||||
#ifdef XINERAMA_DEBUG
|
||||
#include <stdio.h>
|
||||
int ProcInitialConnection();
|
||||
#endif
|
||||
|
@ -91,9 +92,9 @@ int ProcInitialConnection();
|
|||
#include "dispatch.h"
|
||||
#include "swaprep.h"
|
||||
#include "swapreq.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
#ifdef XCSECURITY
|
||||
#define _SECURITY_SERVER
|
||||
|
@ -2641,8 +2642,8 @@ ProcAllocColor(client)
|
|||
else
|
||||
return (retval);
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension || !pmap->pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension || !pmap->pScreen->myNum)
|
||||
#endif
|
||||
WriteReplyToClient(client, sizeof(xAllocColorReply), &acr);
|
||||
return (client->noClientException);
|
||||
|
@ -2700,8 +2701,8 @@ ProcAllocNamedColor (client)
|
|||
else
|
||||
return(retval);
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension || !pcmp->pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension || !pcmp->pScreen->myNum)
|
||||
#endif
|
||||
WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr);
|
||||
return (client->noClientException);
|
||||
|
@ -2770,8 +2771,8 @@ ProcAllocColorCells (client)
|
|||
else
|
||||
return(retval);
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension || !pcmp->pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension || !pcmp->pScreen->myNum)
|
||||
#endif
|
||||
{
|
||||
accr.type = X_Reply;
|
||||
|
@ -2849,8 +2850,8 @@ ProcAllocColorPlanes(client)
|
|||
return(retval);
|
||||
}
|
||||
acpr.length = length >> 2;
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension || !pcmp->pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension || !pcmp->pScreen->myNum)
|
||||
#endif
|
||||
{
|
||||
WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr);
|
||||
|
@ -3932,8 +3933,8 @@ SendConnSetup(client, reason)
|
|||
#endif
|
||||
/* fill in the "currentInputMask" */
|
||||
root = (xWindowRoot *)(lConnectionInfo + connBlockScreenStart);
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension)
|
||||
numScreens = screenInfo.numScreens;
|
||||
else
|
||||
numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
|
||||
|
|
|
@ -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 $ */
|
||||
/************************************************************************
|
||||
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
||||
|
@ -41,8 +42,9 @@ SOFTWARE.
|
|||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
extern Bool noXineramaExtension;
|
||||
#endif
|
||||
|
||||
#ifdef LBX
|
||||
|
@ -1398,8 +1400,8 @@ bail:
|
|||
|
||||
if (c->err != Success) err = c->err;
|
||||
if (err != Success && c->client != serverClient) {
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension || !c->pGC->pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension || !c->pGC->pScreen->myNum)
|
||||
#endif
|
||||
SendErrorToClient(c->client, c->reqType, 0, 0, err);
|
||||
}
|
||||
|
|
295
dix/events.c
295
dix/events.c
|
@ -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 $ */
|
||||
/************************************************************
|
||||
|
||||
|
@ -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 *
|
||||
|
@ -82,9 +83,9 @@ SOFTWARE.
|
|||
#include "cursorstr.h"
|
||||
|
||||
#include "dixstruct.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
#include "globals.h"
|
||||
|
||||
|
@ -140,7 +141,6 @@ extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
|||
|
||||
#define XE_KBPTR (xE->u.keyButtonPointer)
|
||||
|
||||
|
||||
#define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
|
||||
|
||||
CallbackListPtr EventCallback;
|
||||
|
@ -183,14 +183,14 @@ static struct {
|
|||
CursorPtr current;
|
||||
BoxRec hotLimits; /* logical constraints of hot spot */
|
||||
Bool confined; /* confined to screen */
|
||||
#if defined(SHAPE) || defined(PANORAMIX)
|
||||
#if defined(SHAPE) || defined(XINERAMA)
|
||||
RegionPtr hotShape; /* additional logical shape constraint */
|
||||
#endif
|
||||
BoxRec physLimits; /* physical constraints of hot spot */
|
||||
WindowPtr win; /* window of logical position */
|
||||
HotSpot hot; /* logical pointer position */
|
||||
HotSpot hotPhys; /* physical pointer position */
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
ScreenPtr screen; /* all others are in Screen 0 coordinates */
|
||||
RegionRec Reg1; /* Region 1 for confining motion */
|
||||
RegionRec Reg2; /* Region 2 for confining virtual motion */
|
||||
|
@ -263,9 +263,8 @@ static CARD8 criticalEvents[32] =
|
|||
0x7c /* key and button events */
|
||||
};
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
|
||||
static void ConfineToShape(RegionPtr shape, int *px, int *py);
|
||||
static void SyntheticMotion(int x, int y);
|
||||
static void PostNewCursor(void);
|
||||
|
||||
|
@ -284,8 +283,8 @@ XineramaSetCursorPosition(
|
|||
that screen are. */
|
||||
|
||||
pScreen = sprite.screen;
|
||||
x += panoramiXdataPtr[0].x;
|
||||
y += panoramiXdataPtr[0].y;
|
||||
x += xineramaDataPtr[0].x;
|
||||
y += xineramaDataPtr[0].y;
|
||||
|
||||
if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
|
||||
x, y, &box))
|
||||
|
@ -303,10 +302,10 @@ XineramaSetCursorPosition(
|
|||
}
|
||||
|
||||
sprite.screen = pScreen;
|
||||
sprite.hotPhys.x = x - panoramiXdataPtr[0].x;
|
||||
sprite.hotPhys.y = y - panoramiXdataPtr[0].y;
|
||||
x -= panoramiXdataPtr[pScreen->myNum].x;
|
||||
y -= panoramiXdataPtr[pScreen->myNum].y;
|
||||
sprite.hotPhys.x = x - xineramaDataPtr[0].x;
|
||||
sprite.hotPhys.y = y - xineramaDataPtr[0].y;
|
||||
x -= xineramaDataPtr[pScreen->myNum].x;
|
||||
y -= xineramaDataPtr[pScreen->myNum].y;
|
||||
|
||||
return (*pScreen->SetCursorPosition)(pScreen, x, y, generateEvent);
|
||||
}
|
||||
|
@ -320,14 +319,19 @@ XineramaConstrainCursor(void)
|
|||
|
||||
/* Translate the constraining box to the screen
|
||||
the sprite is actually on */
|
||||
newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
|
||||
newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
|
||||
newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
|
||||
newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
|
||||
newBox.x1 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
|
||||
newBox.x2 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
|
||||
newBox.y1 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
|
||||
newBox.y2 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
|
||||
|
||||
(* pScreen->ConstrainCursor)(pScreen, &newBox);
|
||||
}
|
||||
|
||||
#ifdef SHAPE
|
||||
static void
|
||||
ConfineToShape(RegionPtr, int *, int *);
|
||||
#endif
|
||||
|
||||
static void
|
||||
XineramaCheckPhysLimits(
|
||||
CursorPtr cursor,
|
||||
|
@ -375,17 +379,17 @@ XineramaSetWindowPntrs(WindowPtr pWin)
|
|||
{
|
||||
if(pWin == WindowTable[0]) {
|
||||
memcpy(sprite.windows, WindowTable,
|
||||
PanoramiXNumScreens*sizeof(WindowPtr));
|
||||
XineramaNumScreens*sizeof(WindowPtr));
|
||||
} else {
|
||||
PanoramiXRes *win;
|
||||
XineramaRes *win;
|
||||
int i;
|
||||
|
||||
win = (PanoramiXRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
|
||||
win = (XineramaRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
|
||||
|
||||
if(!win)
|
||||
return FALSE;
|
||||
|
||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 0; i < XineramaNumScreens; i++) {
|
||||
sprite.windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW);
|
||||
if(!sprite.windows[i]) /* window is being unmapped */
|
||||
return FALSE;
|
||||
|
@ -416,16 +420,16 @@ XineramaCheckVirtualMotion(
|
|||
if(!XineramaSetWindowPntrs(pWin))
|
||||
return;
|
||||
|
||||
i = PanoramiXNumScreens - 1;
|
||||
i = XineramaNumScreens - 1;
|
||||
|
||||
REGION_COPY(sprite.screen, &sprite.Reg2,
|
||||
&sprite.windows[i]->borderSize);
|
||||
off_x = panoramiXdataPtr[i].x;
|
||||
off_y = panoramiXdataPtr[i].y;
|
||||
off_x = xineramaDataPtr[i].x;
|
||||
off_y = xineramaDataPtr[i].y;
|
||||
|
||||
while(i--) {
|
||||
x = off_x - panoramiXdataPtr[i].x;
|
||||
y = off_y - panoramiXdataPtr[i].y;
|
||||
x = off_x - xineramaDataPtr[i].x;
|
||||
y = off_y - xineramaDataPtr[i].y;
|
||||
|
||||
if(x || y)
|
||||
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
|
||||
|
@ -433,8 +437,8 @@ XineramaCheckVirtualMotion(
|
|||
REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
|
||||
&sprite.windows[i]->borderSize);
|
||||
|
||||
off_x = panoramiXdataPtr[i].x;
|
||||
off_y = panoramiXdataPtr[i].y;
|
||||
off_x = xineramaDataPtr[i].x;
|
||||
off_y = xineramaDataPtr[i].y;
|
||||
}
|
||||
|
||||
lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
|
||||
|
@ -471,10 +475,10 @@ XineramaCheckMotion(xEvent *xE)
|
|||
/* Motion events entering DIX get translated to Screen 0
|
||||
coordinates. Replayed events have already been
|
||||
translated since they've entered DIX before */
|
||||
XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
|
||||
panoramiXdataPtr[0].x;
|
||||
XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
|
||||
panoramiXdataPtr[0].y;
|
||||
XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
|
||||
xineramaDataPtr[0].x;
|
||||
XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
|
||||
xineramaDataPtr[0].y;
|
||||
|
||||
sprite.hot.x = XE_KBPTR.rootX;
|
||||
sprite.hot.y = XE_KBPTR.rootY;
|
||||
|
@ -533,16 +537,16 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
|
|||
if(!XineramaSetWindowPntrs(pWin))
|
||||
return;
|
||||
|
||||
i = PanoramiXNumScreens - 1;
|
||||
i = XineramaNumScreens - 1;
|
||||
|
||||
REGION_COPY(sprite.screen, &sprite.Reg1,
|
||||
&sprite.windows[i]->borderSize);
|
||||
off_x = panoramiXdataPtr[i].x;
|
||||
off_y = panoramiXdataPtr[i].y;
|
||||
off_x = xineramaDataPtr[i].x;
|
||||
off_y = xineramaDataPtr[i].y;
|
||||
|
||||
while(i--) {
|
||||
x = off_x - panoramiXdataPtr[i].x;
|
||||
y = off_y - panoramiXdataPtr[i].y;
|
||||
x = off_x - xineramaDataPtr[i].x;
|
||||
y = off_y - xineramaDataPtr[i].y;
|
||||
|
||||
if(x || y)
|
||||
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
|
||||
|
@ -550,8 +554,8 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
|
|||
REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
|
||||
&sprite.windows[i]->borderSize);
|
||||
|
||||
off_x = panoramiXdataPtr[i].x;
|
||||
off_y = panoramiXdataPtr[i].y;
|
||||
off_x = xineramaDataPtr[i].x;
|
||||
off_y = xineramaDataPtr[i].y;
|
||||
}
|
||||
|
||||
sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
|
||||
|
@ -583,7 +587,7 @@ XineramaChangeToCursor(CursorPtr cursor)
|
|||
}
|
||||
|
||||
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
|
||||
void
|
||||
SetMaskForEvent(mask, event)
|
||||
|
@ -609,13 +613,13 @@ SyntheticMotion(int x, int y)
|
|||
{
|
||||
xEvent xE;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
/* Translate back to the sprite screen since processInputProc
|
||||
will translate from sprite screen to screen 0 upon reentry
|
||||
to the DIX layer */
|
||||
if(!noPanoramiXExtension) {
|
||||
x += panoramiXdataPtr[0].x - panoramiXdataPtr[sprite.screen->myNum].x;
|
||||
y += panoramiXdataPtr[0].y - panoramiXdataPtr[sprite.screen->myNum].y;
|
||||
if(!noXineramaExtension) {
|
||||
x += xineramaDataPtr[0].x - xineramaDataPtr[sprite.screen->myNum].x;
|
||||
y += xineramaDataPtr[0].y - xineramaDataPtr[sprite.screen->myNum].y;
|
||||
}
|
||||
#endif
|
||||
xE.u.keyButtonPointer.rootX = x;
|
||||
|
@ -716,8 +720,9 @@ CheckVirtualMotion(
|
|||
register QdEventPtr qe,
|
||||
register WindowPtr pWin)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
XineramaCheckVirtualMotion(qe, pWin);
|
||||
return;
|
||||
}
|
||||
|
@ -767,8 +772,8 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
|
|||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
XineramaConfineCursorToWindow(pWin, generateEvents);
|
||||
return;
|
||||
}
|
||||
|
@ -800,8 +805,8 @@ PointerConfinedToScreen()
|
|||
static void
|
||||
ChangeToCursor(CursorPtr cursor)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
XineramaChangeToCursor(cursor);
|
||||
return;
|
||||
}
|
||||
|
@ -885,17 +890,17 @@ GetSpritePosition(px, py)
|
|||
*py = sprite.hotPhys.y;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
int
|
||||
XineramaGetCursorScreen()
|
||||
{
|
||||
if(!noPanoramiXExtension) {
|
||||
if(!noXineramaExtension) {
|
||||
return sprite.screen->myNum;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
|
||||
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
||||
|
||||
|
@ -969,12 +974,12 @@ EnqueueEvent(xE, device, count)
|
|||
}
|
||||
if (xE->u.u.type == MotionNotify)
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
|
||||
panoramiXdataPtr[0].x;
|
||||
XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
|
||||
panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
|
||||
xineramaDataPtr[0].x;
|
||||
XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
|
||||
xineramaDataPtr[0].y;
|
||||
}
|
||||
#endif
|
||||
sprite.hotPhys.x = XE_KBPTR.rootX;
|
||||
|
@ -1025,17 +1030,17 @@ PlayReleasedEvents(void)
|
|||
CheckVirtualMotion(qe, NullWindow);
|
||||
syncEvents.time.months = qe->months;
|
||||
syncEvents.time.milliseconds = qe->event->u.keyButtonPointer.time;
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
/* Translate back to the sprite screen since processInputProc
|
||||
will translate from sprite screen to screen 0 upon reentry
|
||||
to the DIX layer */
|
||||
if(!noPanoramiXExtension) {
|
||||
if(!noXineramaExtension) {
|
||||
qe->event->u.keyButtonPointer.rootX +=
|
||||
panoramiXdataPtr[0].x -
|
||||
panoramiXdataPtr[sprite.screen->myNum].x;
|
||||
xineramaDataPtr[0].x -
|
||||
xineramaDataPtr[sprite.screen->myNum].x;
|
||||
qe->event->u.keyButtonPointer.rootY +=
|
||||
panoramiXdataPtr[0].y -
|
||||
panoramiXdataPtr[sprite.screen->myNum].y;
|
||||
xineramaDataPtr[0].y -
|
||||
xineramaDataPtr[sprite.screen->myNum].y;
|
||||
}
|
||||
#endif
|
||||
(*qe->device->public.processInputProc)(qe->event, qe->device,
|
||||
|
@ -1664,7 +1669,7 @@ DeliverEventsToWindow(pWin, pEvents, count, filter, grab, mskidx)
|
|||
Only works for core events.
|
||||
*/
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
static int
|
||||
XineramaTryClientEventsResult(
|
||||
ClientPtr client,
|
||||
|
@ -1697,8 +1702,8 @@ MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient)
|
|||
{
|
||||
if (wClient(pWin) == dontClient)
|
||||
return 0;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
|
||||
return XineramaTryClientEventsResult(
|
||||
wClient(pWin), NullGrab, pWin->eventMask, filter);
|
||||
#endif
|
||||
|
@ -1711,8 +1716,8 @@ MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient)
|
|||
{
|
||||
if (SameClient(other, dontClient))
|
||||
return 0;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
|
||||
return XineramaTryClientEventsResult(
|
||||
rClient(other), NullGrab, other->mask, filter);
|
||||
#endif
|
||||
|
@ -1854,8 +1859,8 @@ DeliverEvents(pWin, xE, count, otherParent)
|
|||
Mask filter;
|
||||
int deliveries;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
|
||||
return count;
|
||||
#endif
|
||||
|
||||
|
@ -1885,7 +1890,7 @@ DeliverEvents(pWin, xE, count, otherParent)
|
|||
return deliveries;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
static Bool
|
||||
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))
|
||||
return TRUE;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
|
||||
int i;
|
||||
|
||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 1; i < XineramaNumScreens; i++) {
|
||||
if(POINT_IN_REGION(sprite.screen,
|
||||
&sprite.windows[i]->borderSize,
|
||||
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
|
||||
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
|
||||
x + xineramaDataPtr[0].x - xineramaDataPtr[i].x,
|
||||
y + xineramaDataPtr[0].y - xineramaDataPtr[i].y,
|
||||
&box))
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1910,6 +1915,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
|||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
#endif /* NO_XINERAMA_PORT */
|
||||
|
||||
static WindowPtr
|
||||
XYToWindow(int x, int y)
|
||||
|
@ -1932,7 +1938,13 @@ XYToWindow(int x, int y)
|
|||
* is made to see if the point is inside
|
||||
* borderSize
|
||||
*/
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
|
||||
#else
|
||||
&& (!wBoundingShape(pWin) ||
|
||||
POINT_IN_REGION(pWin->drawable.pScreen,
|
||||
&pWin->borderSize, x, y, &box))
|
||||
#endif
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -1958,8 +1970,8 @@ CheckMotion(xEvent *xE)
|
|||
{
|
||||
WindowPtr prevSpriteWin = sprite.win;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return XineramaCheckMotion(xE);
|
||||
#endif
|
||||
|
||||
|
@ -2047,12 +2059,12 @@ DefineInitialRootWindow(win)
|
|||
(*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE);
|
||||
(*pScreen->DisplayCursor) (pScreen, sprite.current);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
sprite.hotLimits.x1 = -panoramiXdataPtr[0].x;
|
||||
sprite.hotLimits.y1 = -panoramiXdataPtr[0].y;
|
||||
sprite.hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x;
|
||||
sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
sprite.hotLimits.x1 = -xineramaDataPtr[0].x;
|
||||
sprite.hotLimits.y1 = -xineramaDataPtr[0].y;
|
||||
sprite.hotLimits.x2 = XineramaPixWidth - xineramaDataPtr[0].x;
|
||||
sprite.hotLimits.y2 = XineramaPixHeight - xineramaDataPtr[0].y;
|
||||
sprite.physLimits = sprite.hotLimits;
|
||||
sprite.confineWin = NullWindow;
|
||||
#ifdef SHAPE
|
||||
|
@ -2088,12 +2100,12 @@ NewCurrentScreen(newScreen, x, y)
|
|||
{
|
||||
sprite.hotPhys.x = x;
|
||||
sprite.hotPhys.y = y;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
sprite.hotPhys.x += panoramiXdataPtr[newScreen->myNum].x -
|
||||
panoramiXdataPtr[0].x;
|
||||
sprite.hotPhys.y += panoramiXdataPtr[newScreen->myNum].y -
|
||||
panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
sprite.hotPhys.x += xineramaDataPtr[newScreen->myNum].x -
|
||||
xineramaDataPtr[0].x;
|
||||
sprite.hotPhys.y += xineramaDataPtr[newScreen->myNum].y -
|
||||
xineramaDataPtr[0].y;
|
||||
if (newScreen != sprite.screen) {
|
||||
sprite.screen = newScreen;
|
||||
/* Make sure we tell the DDX to update its copy of the screen */
|
||||
|
@ -2105,10 +2117,10 @@ NewCurrentScreen(newScreen, x, y)
|
|||
told of the pointer warp so we reposition it here */
|
||||
if(!syncEvents.playingEvents)
|
||||
(*sprite.screen->SetCursorPosition)(sprite.screen,
|
||||
sprite.hotPhys.x + panoramiXdataPtr[0].x -
|
||||
panoramiXdataPtr[sprite.screen->myNum].x,
|
||||
sprite.hotPhys.y + panoramiXdataPtr[0].y -
|
||||
panoramiXdataPtr[sprite.screen->myNum].y, FALSE);
|
||||
sprite.hotPhys.x + xineramaDataPtr[0].x -
|
||||
xineramaDataPtr[sprite.screen->myNum].x,
|
||||
sprite.hotPhys.y + xineramaDataPtr[0].y -
|
||||
xineramaDataPtr[sprite.screen->myNum].y, FALSE);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
@ -2116,7 +2128,7 @@ NewCurrentScreen(newScreen, x, y)
|
|||
ConfineCursorToWindow(WindowTable[newScreen->myNum], TRUE, FALSE);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
|
||||
static Bool
|
||||
XineramaPointInWindowIsVisible(
|
||||
|
@ -2136,14 +2148,14 @@ XineramaPointInWindowIsVisible(
|
|||
|
||||
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
|
||||
|
||||
xoff = x + panoramiXdataPtr[0].x;
|
||||
yoff = y + panoramiXdataPtr[0].y;
|
||||
xoff = x + xineramaDataPtr[0].x;
|
||||
yoff = y + xineramaDataPtr[0].y;
|
||||
|
||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 1; i < XineramaNumScreens; i++) {
|
||||
pWin = sprite.windows[i];
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
x = xoff - panoramiXdataPtr[i].x;
|
||||
y = yoff - panoramiXdataPtr[i].y;
|
||||
x = xoff - xineramaDataPtr[i].x;
|
||||
y = yoff - xineramaDataPtr[i].y;
|
||||
|
||||
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
|
||||
return TRUE;
|
||||
|
@ -2183,8 +2195,8 @@ XineramaWarpPointer(ClientPtr client)
|
|||
winX = source->drawable.x;
|
||||
winY = source->drawable.y;
|
||||
if(source == WindowTable[0]) {
|
||||
winX -= panoramiXdataPtr[0].x;
|
||||
winY -= panoramiXdataPtr[0].y;
|
||||
winX -= xineramaDataPtr[0].x;
|
||||
winY -= xineramaDataPtr[0].y;
|
||||
}
|
||||
if (x < winX + stuff->srcX ||
|
||||
y < winY + stuff->srcY ||
|
||||
|
@ -2199,8 +2211,8 @@ XineramaWarpPointer(ClientPtr client)
|
|||
x = dest->drawable.x;
|
||||
y = dest->drawable.y;
|
||||
if(dest == WindowTable[0]) {
|
||||
x -= panoramiXdataPtr[0].x;
|
||||
y -= panoramiXdataPtr[0].y;
|
||||
x -= xineramaDataPtr[0].x;
|
||||
y -= xineramaDataPtr[0].y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2223,7 +2235,7 @@ XineramaWarpPointer(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* XINERAMA */
|
||||
|
||||
|
||||
int
|
||||
|
@ -2238,8 +2250,8 @@ ProcWarpPointer(client)
|
|||
|
||||
REQUEST_SIZE_MATCH(xWarpPointerReq);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
return XineramaWarpPointer(client);
|
||||
#endif
|
||||
|
||||
|
@ -2316,17 +2328,18 @@ ProcWarpPointer(client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
static Bool
|
||||
BorderSizeNotEmpty(WindowPtr pWin)
|
||||
{
|
||||
if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
|
||||
return TRUE;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
|
||||
int i;
|
||||
|
||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 1; i < XineramaNumScreens; i++) {
|
||||
if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -2334,6 +2347,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
|
|||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
#endif /* NO_XINERAMA_PORT */
|
||||
|
||||
/* "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a
|
||||
passive grab set on the window to be activated. */
|
||||
|
@ -2389,7 +2403,12 @@ CheckPassiveGrabsOnWindow(
|
|||
if (GrabMatchesSecond(&tempGrab, grab) &&
|
||||
(!grab->confineTo ||
|
||||
(grab->confineTo->realized &&
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
BorderSizeNotEmpty(grab->confineTo))))
|
||||
#else
|
||||
REGION_NOTEMPTY( grab->confineTo->drawable.pScreen,
|
||||
&grab->confineTo->borderSize))))
|
||||
#endif
|
||||
{
|
||||
#ifdef XCSECURITY
|
||||
if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE))
|
||||
|
@ -3331,8 +3350,8 @@ DoFocusEvents(dev, fromWin, toWin, mode)
|
|||
FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer,
|
||||
TRUE);
|
||||
/* Notify all the roots */
|
||||
#ifdef PANORAMIX
|
||||
if ( !noPanoramiXExtension )
|
||||
#ifdef XINERAMA
|
||||
if ( !noXineramaExtension )
|
||||
FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
|
||||
else
|
||||
#endif
|
||||
|
@ -3350,8 +3369,8 @@ DoFocusEvents(dev, fromWin, toWin, mode)
|
|||
NotifyNonlinearVirtual, FALSE);
|
||||
}
|
||||
/* Notify all the roots */
|
||||
#ifdef PANORAMIX
|
||||
if ( !noPanoramiXExtension )
|
||||
#ifdef XINERAMA
|
||||
if ( !noXineramaExtension )
|
||||
FocusEvent(dev, FocusIn, mode, in, WindowTable[0]);
|
||||
else
|
||||
#endif
|
||||
|
@ -3368,8 +3387,8 @@ DoFocusEvents(dev, fromWin, toWin, mode)
|
|||
if (fromWin == PointerRootWin)
|
||||
FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer,
|
||||
TRUE);
|
||||
#ifdef PANORAMIX
|
||||
if ( !noPanoramiXExtension )
|
||||
#ifdef XINERAMA
|
||||
if ( !noXineramaExtension )
|
||||
FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
|
||||
else
|
||||
#endif
|
||||
|
@ -3882,13 +3901,13 @@ ProcQueryPointer(client)
|
|||
rep.winY = 0;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
rep.rootX += panoramiXdataPtr[0].x;
|
||||
rep.rootY += panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
rep.rootX += xineramaDataPtr[0].x;
|
||||
rep.rootY += xineramaDataPtr[0].y;
|
||||
if(stuff->id == rep.root) {
|
||||
rep.winX += panoramiXdataPtr[0].x;
|
||||
rep.winY += panoramiXdataPtr[0].y;
|
||||
rep.winX += xineramaDataPtr[0].x;
|
||||
rep.winY += xineramaDataPtr[0].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -4350,8 +4369,8 @@ CheckCursorConfinement(pWin)
|
|||
GrabPtr grab = inputInfo.pointer->grab;
|
||||
WindowPtr confineTo;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && pWin->drawable.pScreen->myNum) return;
|
||||
#endif
|
||||
|
||||
if (grab && (confineTo = grab->confineTo))
|
||||
|
@ -4410,8 +4429,8 @@ ProcRecolorCursor(client)
|
|||
for (nscr = 0; nscr < screenInfo.numScreens; nscr++)
|
||||
{
|
||||
pscr = screenInfo.screens[nscr];
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
displayed = (pscr == sprite.screen);
|
||||
else
|
||||
#endif
|
||||
|
@ -4428,7 +4447,7 @@ WriteEventsToClient(pClient, count, events)
|
|||
int count;
|
||||
xEvent *events;
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
xEvent eventCopy;
|
||||
#endif
|
||||
xEvent eventTo, *eventFrom;
|
||||
|
@ -4439,9 +4458,9 @@ WriteEventsToClient(pClient, count, events)
|
|||
return;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension &&
|
||||
(panoramiXdataPtr[0].x || panoramiXdataPtr[0].y))
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension &&
|
||||
(xineramaDataPtr[0].x || xineramaDataPtr[0].y))
|
||||
{
|
||||
switch(events->u.u.type) {
|
||||
case MotionNotify:
|
||||
|
@ -4458,13 +4477,13 @@ WriteEventsToClient(pClient, count, events)
|
|||
*/
|
||||
count = 1; /* should always be 1 */
|
||||
memcpy(&eventCopy, events, sizeof(xEvent));
|
||||
eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x;
|
||||
eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y;
|
||||
eventCopy.u.keyButtonPointer.rootX += xineramaDataPtr[0].x;
|
||||
eventCopy.u.keyButtonPointer.rootY += xineramaDataPtr[0].y;
|
||||
if(eventCopy.u.keyButtonPointer.event ==
|
||||
eventCopy.u.keyButtonPointer.root)
|
||||
{
|
||||
eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x;
|
||||
eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y;
|
||||
eventCopy.u.keyButtonPointer.eventX += xineramaDataPtr[0].x;
|
||||
eventCopy.u.keyButtonPointer.eventY += xineramaDataPtr[0].y;
|
||||
}
|
||||
events = &eventCopy;
|
||||
break;
|
||||
|
|
31
dix/main.c
31
dix/main.c
|
@ -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 $ */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -47,7 +48,7 @@ SOFTWARE.
|
|||
******************************************************************/
|
||||
/* $Xorg: main.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
|
||||
|
||||
/* The panoramix components contained the following notice */
|
||||
/* The Xinerama components contained the following notice */
|
||||
/****************************************************************
|
||||
* *
|
||||
* Copyright (c) Digital Equipment Corporation, 1991, 1997 *
|
||||
|
@ -92,8 +93,8 @@ SOFTWARE.
|
|||
#include "site.h"
|
||||
#include "dixfont.h"
|
||||
#include "extnsionst.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
extern Bool noXineramaExtension;
|
||||
#else
|
||||
#include "dixevents.h" /* InitEvents() */
|
||||
#include "dispatch.h" /* InitProcVectors() */
|
||||
|
@ -122,7 +123,7 @@ extern int screenPrivateCount;
|
|||
extern void InitProcVectors(void);
|
||||
extern Bool CreateGCperDepthArray(void);
|
||||
|
||||
#ifndef PANORAMIX
|
||||
#ifndef XINERAMA
|
||||
static
|
||||
#endif
|
||||
Bool CreateConnectionBlock(void);
|
||||
|
@ -402,12 +403,12 @@ main(int argc, char *argv[], char *envp[])
|
|||
DPMSEnabled = FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
/*
|
||||
* Consolidate window and colourmap information for each screen
|
||||
*/
|
||||
if (!noPanoramiXExtension)
|
||||
PanoramiXConsolidate();
|
||||
if (!noXineramaExtension)
|
||||
XineramaConsolidate();
|
||||
#endif
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++)
|
||||
|
@ -418,9 +419,9 @@ main(int argc, char *argv[], char *envp[])
|
|||
SetDPMSTimers();
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension) {
|
||||
if (!PanoramiXCreateConnectionBlock())
|
||||
#ifdef XINERAMA
|
||||
if (!noXineramaExtension) {
|
||||
if (!XineramaCreateConnectionBlock())
|
||||
FatalError("could not create connection block info");
|
||||
} else
|
||||
#endif
|
||||
|
@ -437,12 +438,12 @@ main(int argc, char *argv[], char *envp[])
|
|||
FreeScreenSaverTimer();
|
||||
CloseDownExtensions();
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
{
|
||||
Bool remember_it = noPanoramiXExtension;
|
||||
noPanoramiXExtension = TRUE;
|
||||
Bool remember_it = noXineramaExtension;
|
||||
noXineramaExtension = TRUE;
|
||||
FreeAllResources();
|
||||
noPanoramiXExtension = remember_it;
|
||||
noXineramaExtension = remember_it;
|
||||
}
|
||||
#else
|
||||
FreeAllResources();
|
||||
|
@ -492,7 +493,7 @@ main(int argc, char *argv[], char *envp[])
|
|||
|
||||
static int padlength[4] = {0, 3, 2, 1};
|
||||
|
||||
#ifndef PANORAMIX
|
||||
#ifndef XINERAMA
|
||||
static
|
||||
#endif
|
||||
Bool
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1987, 1998 The Open Group
|
||||
|
@ -88,9 +89,9 @@ SOFTWARE.
|
|||
#include "dixevents.h"
|
||||
#include "dixgrabs.h"
|
||||
#include "cursor.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -672,7 +673,7 @@ FindAllClientResources(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
pointer
|
||||
LookupClientResourceComplex(
|
||||
ClientPtr client,
|
||||
|
@ -698,7 +699,7 @@ LookupClientResourceComplex(
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* NO_XINERAMA_PORT */
|
||||
|
||||
void
|
||||
FreeClientNeverRetainResources(ClientPtr client)
|
||||
|
@ -797,17 +798,17 @@ LegalNewID(id, client)
|
|||
register ClientPtr client;
|
||||
{
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
XID minid, maxid;
|
||||
|
||||
if (!noPanoramiXExtension) {
|
||||
if (!noXineramaExtension) {
|
||||
minid = client->clientAsMask | (client->index ?
|
||||
SERVER_BIT : SERVER_MINID);
|
||||
maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1;
|
||||
if ((id >= minid) && (id <= maxid))
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) &&
|
||||
((clientTable[client->index].expectID <= id) ||
|
||||
!LookupIDByClass(id, RC_ANY)));
|
||||
|
|
57
dix/window.c
57
dix/window.c
|
@ -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 $ */
|
||||
/*
|
||||
|
||||
|
@ -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 *
|
||||
|
@ -85,9 +86,9 @@ SOFTWARE.
|
|||
#include "dixstruct.h"
|
||||
#include "gcstruct.h"
|
||||
#include "servermd.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
#include "dixevents.h"
|
||||
#include "globals.h"
|
||||
|
@ -2320,10 +2321,10 @@ ConfigureWindow(pWin, mask, vlist, client)
|
|||
event.u.u.detail = Above;
|
||||
event.u.configureRequest.x = x;
|
||||
event.u.configureRequest.y = y;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
||||
event.u.configureRequest.x += panoramiXdataPtr[0].x;
|
||||
event.u.configureRequest.y += panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && (!pParent || !pParent->parent)) {
|
||||
event.u.configureRequest.x += xineramaDataPtr[0].x;
|
||||
event.u.configureRequest.y += xineramaDataPtr[0].y;
|
||||
}
|
||||
#endif
|
||||
event.u.configureRequest.width = w;
|
||||
|
@ -2406,10 +2407,10 @@ ActuallyDoSomething:
|
|||
event.u.configureNotify.aboveSibling = None;
|
||||
event.u.configureNotify.x = x;
|
||||
event.u.configureNotify.y = y;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && (!pParent || !pParent->parent)) {
|
||||
event.u.configureNotify.x += panoramiXdataPtr[0].x;
|
||||
event.u.configureNotify.y += panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && (!pParent || !pParent->parent)) {
|
||||
event.u.configureNotify.x += xineramaDataPtr[0].x;
|
||||
event.u.configureNotify.y += xineramaDataPtr[0].y;
|
||||
}
|
||||
#endif
|
||||
event.u.configureNotify.width = w;
|
||||
|
@ -2564,10 +2565,10 @@ ReparentWindow(pWin, pParent, x, y, client)
|
|||
event.u.reparent.parent = pParent->drawable.id;
|
||||
event.u.reparent.x = x;
|
||||
event.u.reparent.y = y;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && !pParent->parent) {
|
||||
event.u.reparent.x += panoramiXdataPtr[0].x;
|
||||
event.u.reparent.y += panoramiXdataPtr[0].y;
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && !pParent->parent) {
|
||||
event.u.reparent.x += xineramaDataPtr[0].x;
|
||||
event.u.reparent.y += xineramaDataPtr[0].y;
|
||||
}
|
||||
#endif
|
||||
event.u.reparent.override = pWin->overrideRedirect;
|
||||
|
@ -2937,10 +2938,10 @@ UnrealizeTree(
|
|||
{
|
||||
pChild->realized = FALSE;
|
||||
pChild->visibility = VisibilityNotViewable;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) {
|
||||
PanoramiXRes *win;
|
||||
win = (PanoramiXRes*)LookupIDByType(pChild->drawable.id,
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension && !pChild->drawable.pScreen->myNum) {
|
||||
XineramaRes *win;
|
||||
win = (XineramaRes*)LookupIDByType(pChild->drawable.id,
|
||||
XRT_WINDOW);
|
||||
if(win)
|
||||
win->u.win.visibility = VisibilityNotViewable;
|
||||
|
@ -3219,25 +3220,26 @@ SendVisibilityNotify(pWin)
|
|||
WindowPtr pWin;
|
||||
{
|
||||
xEvent event;
|
||||
#ifndef NO_XINERAMA_PORT
|
||||
unsigned int visibility = pWin->visibility;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#endif
|
||||
#ifdef XINERAMA
|
||||
/* This is not quite correct yet, but it's close */
|
||||
if(!noPanoramiXExtension) {
|
||||
PanoramiXRes *win;
|
||||
if(!noXineramaExtension) {
|
||||
XineramaRes *win;
|
||||
WindowPtr pWin2;
|
||||
int i, Scrnum;
|
||||
|
||||
Scrnum = pWin->drawable.pScreen->myNum;
|
||||
|
||||
win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum);
|
||||
win = XineramaFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum);
|
||||
|
||||
if(!win || (win->u.win.visibility == visibility))
|
||||
return;
|
||||
|
||||
switch(visibility) {
|
||||
case VisibilityUnobscured:
|
||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 0; i < XineramaNumScreens; i++) {
|
||||
if(i == Scrnum) continue;
|
||||
|
||||
pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
|
||||
|
@ -3257,7 +3259,7 @@ SendVisibilityNotify(pWin)
|
|||
}
|
||||
break;
|
||||
case VisibilityFullyObscured:
|
||||
for(i = 0; i < PanoramiXNumScreens; i++) {
|
||||
for(i = 0; i < XineramaNumScreens; i++) {
|
||||
if(i == Scrnum) continue;
|
||||
|
||||
pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW);
|
||||
|
@ -3275,7 +3277,6 @@ SendVisibilityNotify(pWin)
|
|||
win->u.win.visibility = visibility;
|
||||
}
|
||||
#endif
|
||||
|
||||
event.u.u.type = VisibilityNotify;
|
||||
event.u.visibility.window = pWin->drawable.id;
|
||||
event.u.visibility.state = visibility;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/*
|
||||
* Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
|
||||
*
|
||||
|
@ -223,9 +224,9 @@ fbFillRegionSolid (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -247,14 +248,14 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
|||
int xRot = pDrawable->x;
|
||||
int yRot = pDrawable->y;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
{
|
||||
int index = pDrawable->pScreen->myNum;
|
||||
if(&WindowTable[index]->drawable == pDrawable)
|
||||
{
|
||||
xRot -= panoramiXdataPtr[index].x;
|
||||
yRot -= panoramiXdataPtr[index].y;
|
||||
xRot -= xineramaDataPtr[index].x;
|
||||
yRot -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1792,13 +1792,13 @@
|
|||
F5269C2D01D5BC3501000001 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
path = pseudoramiX.c;
|
||||
path = pseudorama.c;
|
||||
refType = 4;
|
||||
};
|
||||
F5269C2E01D5BC3501000001 = {
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
path = pseudoramiX.h;
|
||||
path = pseudorama.h;
|
||||
refType = 4;
|
||||
};
|
||||
F53321390193CB6A01000001 = {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -27,7 +28,6 @@
|
|||
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||
* 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 $ */
|
||||
|
||||
#include "quartzCommon.h"
|
||||
|
@ -40,7 +40,7 @@
|
|||
#include "quartzCursor.h"
|
||||
#include "rootless.h"
|
||||
#include "safeAlpha.h"
|
||||
#include "pseudoramiX.h"
|
||||
#include "pseudorama.h"
|
||||
#include "applewmExt.h"
|
||||
|
||||
#include "regionstr.h"
|
||||
|
@ -59,8 +59,8 @@ static Class classXView = nil;
|
|||
* CRDisplayInit
|
||||
* Find all screens.
|
||||
*
|
||||
* Multihead note: When rootless mode uses PseudoramiX, the
|
||||
* X server only sees one screen; only PseudoramiX itself knows
|
||||
* Multihead note: When rootless mode uses Pseudorama, the
|
||||
* X server only sees one screen; only Pseudorama itself knows
|
||||
* about all of the screens.
|
||||
*/
|
||||
static void
|
||||
|
@ -68,10 +68,10 @@ CRDisplayInit(void)
|
|||
{
|
||||
ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n");
|
||||
|
||||
if (noPseudoramiXExtension) {
|
||||
if (noPseudoramaExtension) {
|
||||
darwinScreensFound = [[NSScreen screens] count];
|
||||
} else {
|
||||
darwinScreensFound = 1; // only PseudoramiX knows about the rest
|
||||
darwinScreensFound = 1; // only Pseudorama knows about the rest
|
||||
}
|
||||
|
||||
CRAppleWMInit();
|
||||
|
@ -89,7 +89,7 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
|
|||
dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
|
||||
dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent;
|
||||
|
||||
if (noPseudoramiXExtension) {
|
||||
if (noPseudoramaExtension) {
|
||||
NSScreen *screen = [[NSScreen screens] objectAtIndex:index];
|
||||
NSRect frame = [screen frame];
|
||||
|
||||
|
@ -133,7 +133,7 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
|
|||
dfb->height = unionRect.size.height;
|
||||
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),
|
||||
// so compensate for that here.
|
||||
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.
|
||||
for (j = 0; j < i; j++) {
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -159,17 +159,17 @@ CRScreenParams(int index, DarwinFramebufferPtr dfb)
|
|||
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.origin.x, (int)frame.origin.y);
|
||||
|
||||
frame.origin.x -= unionRect.origin.x;
|
||||
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);
|
||||
|
||||
PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
|
||||
PseudoramaAddScreen(frame.origin.x, frame.origin.y,
|
||||
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.
|
||||
// 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->displayIDs = displays;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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[]);
|
|
@ -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
|
||||
|
@ -29,14 +30,13 @@
|
|||
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||
* 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 $ */
|
||||
|
||||
#include "quartzCommon.h"
|
||||
#include "quartz.h"
|
||||
#include "darwin.h"
|
||||
#include "quartzAudio.h"
|
||||
#include "pseudoramiX.h"
|
||||
#include "pseudorama.h"
|
||||
#define _APPLEWM_SERVER_
|
||||
#include "applewm.h"
|
||||
#include "applewmExt.h"
|
||||
|
@ -61,7 +61,7 @@ int quartzServerVisible = TRUE;
|
|||
int quartzServerQuitting = FALSE;
|
||||
int quartzScreenIndex = 0;
|
||||
int aquaMenuBarHeight = 0;
|
||||
int noPseudoramiXExtension = TRUE;
|
||||
int noPseudoramaExtension = TRUE;
|
||||
QuartzModeProcsPtr quartzProcs = NULL;
|
||||
const char *quartzOpenGLBundle = NULL;
|
||||
|
||||
|
@ -140,11 +140,11 @@ void DarwinModeInitOutput(
|
|||
// Do display mode specific initialization
|
||||
quartzProcs->DisplayInit();
|
||||
|
||||
// Init PseudoramiX implementation of Xinerama.
|
||||
// Init Pseudorama implementation of Xinerama.
|
||||
// This should be in InitExtensions, but that causes link errors
|
||||
// for servers that don't link in pseudoramiX.c.
|
||||
if (!noPseudoramiXExtension) {
|
||||
PseudoramiXExtensionInit(argc, argv);
|
||||
// for servers that don't link in pseudorama.c.
|
||||
if (!noPseudoramaExtension) {
|
||||
PseudoramaExtensionInit(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/**************************************************************
|
||||
*
|
||||
* Quartz-specific support for the Darwin X Server
|
||||
|
@ -44,11 +45,11 @@
|
|||
#include <Cocoa/Cocoa.h>
|
||||
|
||||
#import "Preferences.h"
|
||||
#include "pseudoramiX.h"
|
||||
#include "pseudorama.h"
|
||||
|
||||
extern void FatalError(const char *, ...);
|
||||
extern char *display;
|
||||
extern int noPanoramiXExtension;
|
||||
extern int noXineramaExtension;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -67,14 +68,14 @@ void QuartzReadPreferences(void)
|
|||
|
||||
// quartzRootless has already been set
|
||||
if (quartzRootless) {
|
||||
// Use PseudoramiX instead of Xinerama
|
||||
noPanoramiXExtension = TRUE;
|
||||
noPseudoramiXExtension = ![Preferences xinerama];
|
||||
// Use Pseudorama instead of Xinerama
|
||||
noXineramaExtension = TRUE;
|
||||
noPseudoramaExtension = ![Preferences xinerama];
|
||||
|
||||
quartzUseAGL = [Preferences useAGL];
|
||||
} else {
|
||||
noPanoramiXExtension = ![Preferences xinerama];
|
||||
noPseudoramiXExtension = TRUE;
|
||||
noXineramaExtension = ![Preferences xinerama];
|
||||
noPseudoramaExtension = TRUE;
|
||||
|
||||
// Full screen can't use AGL for GLX
|
||||
quartzUseAGL = FALSE;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/*
|
||||
* quartzCommon.h
|
||||
*
|
||||
|
@ -52,7 +53,7 @@
|
|||
typedef struct {
|
||||
// List of CoreGraphics displays that this X11 screen covers.
|
||||
// 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.
|
||||
int displayCount;
|
||||
CGDirectDisplayID *displayIDs;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -27,13 +28,12 @@
|
|||
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||
* 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 $ */
|
||||
|
||||
#include "quartzCommon.h"
|
||||
#include "quartz.h"
|
||||
#include "xpr.h"
|
||||
#include "pseudoramiX.h"
|
||||
#include "pseudorama.h"
|
||||
#include "darwin.h"
|
||||
#include "rootless.h"
|
||||
#include "safeAlpha.h"
|
||||
|
@ -139,11 +139,11 @@ displayScreenBounds(CGDirectDisplayID id)
|
|||
|
||||
|
||||
/*
|
||||
* addPseudoramiXScreens
|
||||
* Add a physical screen with PseudoramiX.
|
||||
* addPseudoramaScreens
|
||||
* Add a physical screen with Pseudorama.
|
||||
*/
|
||||
static void
|
||||
addPseudoramiXScreens(int *x, int *y, int *width, int *height)
|
||||
addPseudoramaScreens(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
CGDisplayCount i, displayCount;
|
||||
CGDirectDisplayID *displayList = NULL;
|
||||
|
@ -168,24 +168,24 @@ addPseudoramiXScreens(int *x, int *y, int *width, int *height)
|
|||
*width = unionRect.size.width;
|
||||
*height = unionRect.size.height;
|
||||
|
||||
/* Tell PseudoramiX about the real screens. */
|
||||
/* Tell Pseudorama about the real screens. */
|
||||
for (i = 0; i < displayCount; i++)
|
||||
{
|
||||
CGDirectDisplayID dpy = displayList[i];
|
||||
|
||||
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.origin.x, (int)frame.origin.y);
|
||||
|
||||
frame.origin.x -= unionRect.origin.x;
|
||||
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);
|
||||
|
||||
PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
|
||||
PseudoramaAddScreen(frame.origin.x, frame.origin.y,
|
||||
frame.size.width, frame.size.height);
|
||||
}
|
||||
|
||||
|
@ -206,10 +206,10 @@ xprDisplayInit(void)
|
|||
|
||||
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. */
|
||||
|
||||
if (noPseudoramiXExtension)
|
||||
if (noPseudoramaExtension)
|
||||
darwinScreensFound = displayCount;
|
||||
else
|
||||
darwinScreensFound = 1;
|
||||
|
@ -270,7 +270,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
|
|||
dfb->colorBitsPerPixel = 8;
|
||||
}
|
||||
|
||||
if (noPseudoramiXExtension)
|
||||
if (noPseudoramaExtension)
|
||||
{
|
||||
CGDirectDisplayID dpy;
|
||||
CGRect frame;
|
||||
|
@ -286,7 +286,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
|
|||
}
|
||||
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
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
|
||||
|
@ -1057,15 +1058,15 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
from = X_DEFAULT;
|
||||
if (!noPanoramiXExtension)
|
||||
if (!noXineramaExtension)
|
||||
from = X_CMDLINE;
|
||||
else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) {
|
||||
noPanoramiXExtension = !value;
|
||||
noXineramaExtension = !value;
|
||||
from = X_CONFIG;
|
||||
}
|
||||
if (!noPanoramiXExtension)
|
||||
if (!noXineramaExtension)
|
||||
xf86Msg(from, "Xinerama: enabled\n");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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 $ */
|
||||
/*
|
||||
* Copyright (c) 1998-2002 by The XFree86 Project, Inc.
|
||||
|
@ -139,8 +140,8 @@ DGAInit(
|
|||
for(i = 0; i < num; i++)
|
||||
modes[i].num = i + 1;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
for(i = 0; i < num; i++)
|
||||
modes[i].flags &= ~DGA_PIXMAP_AVAILABLE;
|
||||
#endif
|
||||
|
|
|
@ -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 $ */
|
||||
/*
|
||||
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
||||
|
@ -1681,8 +1682,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
|||
/* Lookup each mode */
|
||||
#ifdef RANDR
|
||||
if (!xf86Info.disableRandR
|
||||
#ifdef PANORAMIX
|
||||
&& noPanoramiXExtension
|
||||
#ifdef XINERAMA
|
||||
&& noXineramaExtension
|
||||
#endif
|
||||
)
|
||||
validateAllDefaultModes = TRUE;
|
||||
|
|
|
@ -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 $
|
||||
*
|
||||
|
@ -243,9 +244,9 @@ xf86RandRInit (ScreenPtr pScreen)
|
|||
XF86RandRInfoPtr randrp;
|
||||
ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
/* XXX disable RandR when using Xinerama */
|
||||
if (!noPanoramiXExtension)
|
||||
if (!noXineramaExtension)
|
||||
return TRUE;
|
||||
#endif
|
||||
if (xf86RandRGeneration != serverGeneration)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.h,v 1.2 2003/09/13 21:33:04 dawes Exp $ */
|
||||
|
||||
#ifndef INITARGS
|
||||
|
@ -136,7 +137,7 @@ extern void XpExtensionInit(INITARGS);
|
|||
#endif
|
||||
|
||||
#if 1
|
||||
extern void PanoramiXExtensionInit(int argc, char *argv[]);
|
||||
extern void XineramaExtensionInit(int argc, char *argv[]);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
|
|
@ -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 $ */
|
||||
/**************************************************************************
|
||||
|
||||
|
@ -66,8 +67,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "mi.h"
|
||||
#include "mipointer.h"
|
||||
|
||||
#if defined(XFree86LOADER) && !defined(PANORAMIX)
|
||||
extern Bool noPanoramiXExtension;
|
||||
#if defined(XFree86LOADER) && !defined(XINERAMA)
|
||||
extern Bool noXineramaExtension;
|
||||
#endif
|
||||
|
||||
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
|
||||
* anyway.
|
||||
*/
|
||||
#if defined(PANORAMIX) && !defined(XFree86LOADER)
|
||||
#if defined(XINERAMA) && !defined(XFree86LOADER)
|
||||
xineramaInCore = TRUE;
|
||||
#elif defined(XFree86LOADER)
|
||||
if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
|
||||
if (xf86LoaderCheckSymbol("noXineramaExtension"))
|
||||
xineramaInCore = TRUE;
|
||||
#endif
|
||||
|
||||
#if defined(PANORAMIX) || defined(XFree86LOADER)
|
||||
#if defined(XINERAMA) || defined(XFree86LOADER)
|
||||
if (xineramaInCore) {
|
||||
if (!noPanoramiXExtension) {
|
||||
if (!noXineramaExtension) {
|
||||
DRIDrvMsg(pScreen->myNum, X_WARNING,
|
||||
"Direct rendering is not supported when Xinerama is enabled\n");
|
||||
return FALSE;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/**************************************************************************
|
||||
|
||||
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
@ -109,7 +110,7 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
|||
}
|
||||
else {
|
||||
LoaderReqSymLists(drmSymbols, NULL);
|
||||
LoaderRefSymbols("noPanoramiXExtension", NULL);
|
||||
LoaderRefSymbols("noXineramaExtension", NULL);
|
||||
LoadExtension(&XF86DRIExt, FALSE);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
/*
|
||||
|
@ -170,7 +170,7 @@ LOOKUP dixLookupTab[] = {
|
|||
SYMVAR(EventCallback)
|
||||
SYMVAR(inputInfo)
|
||||
SYMVAR(SetCriticalEvent)
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
SYMVAR(XineramaGetCursorScreen)
|
||||
#endif
|
||||
/* property.c */
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
/*
|
||||
|
@ -27,8 +28,8 @@
|
|||
#include "resource.h"
|
||||
#include "sym.h"
|
||||
#include "misc.h"
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#endif
|
||||
#include "sleepuntil.h"
|
||||
|
||||
|
@ -38,11 +39,11 @@ extern int BadShmSegCode;
|
|||
extern RESTYPE ShmSegType, ShmPixType;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
extern int PanoramiXNumScreens;
|
||||
extern PanoramiXData *panoramiXdataPtr;
|
||||
extern XID *PanoramiXVisualTable;
|
||||
#ifdef XINERAMA
|
||||
extern Bool noXineramaExtension;
|
||||
extern int XineramaNumScreens;
|
||||
extern XineramaData *xineramaDataPtr;
|
||||
extern XID *XineramaVisualTable;
|
||||
extern unsigned long XRT_WINDOW;
|
||||
extern unsigned long XRT_PIXMAP;
|
||||
extern unsigned long XRT_GC;
|
||||
|
@ -62,13 +63,13 @@ LOOKUP extLookupTab[] = {
|
|||
SYMVAR(ShmSegType)
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
SYMFUNC(XineramaRegisterConnectionBlockCallback)
|
||||
SYMFUNC(XineramaDeleteResource)
|
||||
SYMVAR(noPanoramiXExtension)
|
||||
SYMVAR(PanoramiXNumScreens)
|
||||
SYMVAR(panoramiXdataPtr)
|
||||
SYMVAR(PanoramiXVisualTable)
|
||||
SYMVAR(noXineramaExtension)
|
||||
SYMVAR(XineramaNumScreens)
|
||||
SYMVAR(xineramaDataPtr)
|
||||
SYMVAR(XineramaVisualTable)
|
||||
SYMVAR(XRT_WINDOW)
|
||||
SYMVAR(XRT_PIXMAP)
|
||||
SYMVAR(XRT_GC)
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
/*
|
||||
|
@ -64,9 +65,9 @@
|
|||
#include "mifillarc.h"
|
||||
#include "micmap.h"
|
||||
#include "mioverlay.h"
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "resource.h"
|
||||
#include "panoramiX.h"
|
||||
#include "xinerama.h"
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
#include "mipict.h"
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -16,9 +17,9 @@
|
|||
#include "pixmapstr.h"
|
||||
#include "mioverlay.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -166,12 +167,12 @@ XAAPaintWindow8_32(
|
|||
xorg = pBgWin->drawable.x;
|
||||
yorg = pBgWin->drawable.y;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
int index = pScreen->myNum;
|
||||
if(WindowTable[index] == pBgWin) {
|
||||
xorg -= panoramiXdataPtr[index].x;
|
||||
yorg -= panoramiXdataPtr[index].y;
|
||||
xorg -= xineramaDataPtr[index].x;
|
||||
yorg -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
#include "misc.h"
|
||||
|
@ -15,9 +16,9 @@
|
|||
#include "pixmapstr.h"
|
||||
#include "xaawrap.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -91,12 +92,12 @@ XAAPaintWindow(
|
|||
xorg = pBgWin->drawable.x;
|
||||
yorg = pBgWin->drawable.y;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
int index = pScreen->myNum;
|
||||
if(WindowTable[index] == pBgWin) {
|
||||
xorg -= panoramiXdataPtr[index].x;
|
||||
yorg -= panoramiXdataPtr[index].y;
|
||||
xorg -= xineramaDataPtr[index].x;
|
||||
yorg -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
#include "X.h"
|
||||
|
@ -14,9 +15,9 @@
|
|||
#include "cfb8_32.h"
|
||||
#include "mi.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -43,12 +44,12 @@ cfb8_32PaintWindow(
|
|||
case BackgroundPixmap:
|
||||
xorg = pWin->drawable.x;
|
||||
yorg = pWin->drawable.y;
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#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
|
||||
|
@ -91,12 +92,12 @@ cfb8_32PaintWindow(
|
|||
xorg = pBgWin->drawable.x;
|
||||
yorg = pBgWin->drawable.y;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
int index = pWin->drawable.pScreen->myNum;
|
||||
if(WindowTable[index] == pBgWin) {
|
||||
xorg -= panoramiXdataPtr[index].x;
|
||||
yorg -= panoramiXdataPtr[index].y;
|
||||
xorg -= xineramaDataPtr[index].x;
|
||||
yorg -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $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 * /*py*/);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
extern int XineramaGetCursorScreen(void);
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
|
||||
#endif /* CURSOR_H */
|
||||
|
|
|
@ -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 $ */
|
||||
|
||||
#ifndef _XSERV_GLOBAL_H_
|
||||
|
@ -40,12 +41,12 @@ extern Bool DPMSDisabledSwitch;
|
|||
extern Bool DPMSCapableFlag;
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
extern Bool PanoramiXMapped;
|
||||
extern Bool PanoramiXVisibilityNotifySent;
|
||||
extern Bool PanoramiXWindowExposureSent;
|
||||
extern Bool PanoramiXOneExposeRequest;
|
||||
#ifdef XINERAMA
|
||||
extern Bool noXineramaExtension;
|
||||
extern Bool XineramaMapped;
|
||||
extern Bool XineramaVisibilityNotifySent;
|
||||
extern Bool XineramaWindowExposureSent;
|
||||
extern Bool XineramaOneExposeRequest;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $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"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -425,20 +426,20 @@ miSendExposures(pWin, pRgn, dx, dy)
|
|||
pe->u.expose.count = i;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension) {
|
||||
int scrnum = pWin->drawable.pScreen->myNum;
|
||||
int x = 0, y = 0;
|
||||
XID realWin = 0;
|
||||
|
||||
if(!pWin->parent) {
|
||||
x = panoramiXdataPtr[scrnum].x;
|
||||
y = panoramiXdataPtr[scrnum].y;
|
||||
x = xineramaDataPtr[scrnum].x;
|
||||
y = xineramaDataPtr[scrnum].y;
|
||||
pWin = WindowTable[0];
|
||||
realWin = pWin->drawable.id;
|
||||
} else if (scrnum) {
|
||||
PanoramiXRes *win;
|
||||
win = PanoramiXFindIDByScrnum(XRT_WINDOW,
|
||||
XineramaRes *win;
|
||||
win = XineramaFindIDByScrnum(XRT_WINDOW,
|
||||
pWin->drawable.id, scrnum);
|
||||
if(!win) {
|
||||
DEALLOCATE_LOCAL(pEvent);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $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
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern Bool noPanoramiXExtension;
|
||||
#ifdef XINERAMA
|
||||
extern Bool noXineramaExtension;
|
||||
#endif
|
||||
extern Bool noTestExtensions;
|
||||
#ifdef XKB
|
||||
|
@ -102,8 +103,8 @@ typedef void (*InitExtension)(INITARGS);
|
|||
#define _SECURITY_SERVER
|
||||
#include "securstr.h"
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiXproto.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xineramaProto.h"
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
#include "xf86bigfstr.h"
|
||||
|
@ -134,8 +135,8 @@ extern void PexExtensionInit(INITARGS);
|
|||
#ifdef MULTIBUFFER
|
||||
extern void MultibufferExtensionInit(INITARGS);
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
extern void PanoramiXExtensionInit(INITARGS);
|
||||
#ifdef XINERAMA
|
||||
extern void XineramaExtensionInit(INITARGS);
|
||||
#endif
|
||||
#ifdef XINPUT
|
||||
extern void XInputExtensionInit(INITARGS);
|
||||
|
@ -246,9 +247,9 @@ InitExtensions(argc, argv)
|
|||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef PANORAMIX
|
||||
# if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX)
|
||||
if (!noPanoramiXExtension) PanoramiXExtensionInit();
|
||||
#ifdef XINERAMA
|
||||
# if !defined(PRINT_ONLY_SERVER) && !defined(NO_XINERAMA)
|
||||
if (!noXineramaExtension) XineramaExtensionInit();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef BEZIER
|
||||
|
@ -436,8 +437,8 @@ ExtensionModule extension[] =
|
|||
{ NULL, "GLX", NULL, NULL },
|
||||
{ NULL, "TOG-CUP", NULL, NULL },
|
||||
{ NULL, "Extended-Visual-Information", NULL, NULL },
|
||||
#ifdef PANORAMIX
|
||||
{ NULL, "XINERAMA", &noPanoramiXExtension, NULL },
|
||||
#ifdef XINERAMA
|
||||
{ NULL, "XINERAMA", &noXineramaExtension, NULL },
|
||||
#else
|
||||
{ NULL, "NOXINERAMA", NULL, NULL },
|
||||
#endif
|
||||
|
@ -487,8 +488,8 @@ static ExtensionModule staticExtensions[] = {
|
|||
#ifdef XPRINT
|
||||
{ XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL },
|
||||
#endif
|
||||
#ifdef PANORAMIX
|
||||
{ PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL },
|
||||
#ifdef XINERAMA
|
||||
{ XineramaExtensionInit, XINERAMA_PROTOCOL_NAME, &noXineramaExtension, NULL, NULL },
|
||||
#endif
|
||||
#ifdef XF86BIGFONT
|
||||
{ XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL },
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/*
|
||||
* Specialized window functions to protect the alpha channel
|
||||
*/
|
||||
|
@ -36,9 +37,9 @@
|
|||
#include "fb.h"
|
||||
#include "safeAlpha.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -67,14 +68,14 @@ SafeAlphaFillRegionTiled(
|
|||
int yRot = pDrawable->y;
|
||||
FbBits planeMask;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if(!noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if(!noXineramaExtension)
|
||||
{
|
||||
int index = pDrawable->pScreen->myNum;
|
||||
if(&WindowTable[index]->drawable == pDrawable)
|
||||
{
|
||||
xRot -= panoramiXdataPtr[index].x;
|
||||
yRot -= panoramiXdataPtr[index].y;
|
||||
xRot -= xineramaDataPtr[index].x;
|
||||
yRot -= xineramaDataPtr[index].y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
21
os/utils.c
21
os/utils.c
|
@ -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 $ */
|
||||
/*
|
||||
|
||||
|
@ -128,12 +129,12 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
Bool CoreDump;
|
||||
Bool noTestExtensions;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
Bool noPanoramiXExtension = TRUE;
|
||||
Bool PanoramiXVisibilityNotifySent = FALSE;
|
||||
Bool PanoramiXMapped = FALSE;
|
||||
Bool PanoramiXWindowExposureSent = FALSE;
|
||||
Bool PanoramiXOneExposeRequest = FALSE;
|
||||
Bool noXineramaExtension = TRUE;
|
||||
#ifdef XINERAMA
|
||||
Bool XineramaVisibilityNotifySent = FALSE;
|
||||
Bool XineramaMapped = FALSE;
|
||||
Bool XineramaWindowExposureSent = FALSE;
|
||||
Bool XineramaOneExposeRequest = FALSE;
|
||||
#endif
|
||||
|
||||
int auditTrailLevel = 1;
|
||||
|
@ -536,7 +537,7 @@ void UseMsg(void)
|
|||
ErrorF("-wm WhenMapped default backing-store\n");
|
||||
ErrorF("-x string loads named extension at init time \n");
|
||||
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
ErrorF("+xinerama Enable XINERAMA extension\n");
|
||||
ErrorF("-xinerama Disable XINERAMA extension\n");
|
||||
#endif
|
||||
|
@ -879,12 +880,12 @@ ProcessCommandLine(int argc, char *argv[])
|
|||
UseMsg();
|
||||
}
|
||||
}
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
else if ( strcmp( argv[i], "+xinerama") == 0){
|
||||
noPanoramiXExtension = FALSE;
|
||||
noXineramaExtension = FALSE;
|
||||
}
|
||||
else if ( strcmp( argv[i], "-xinerama") == 0){
|
||||
noPanoramiXExtension = TRUE;
|
||||
noXineramaExtension = TRUE;
|
||||
}
|
||||
#endif
|
||||
else if ( strcmp( argv[i], "-x") == 0)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $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
|
||||
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
|
||||
and Jim Haggerty of Metheus.
|
||||
|
@ -48,10 +49,10 @@ and Jim Haggerty of Metheus.
|
|||
#include "xf86_ansic.h"
|
||||
#endif
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
#include "globals.h"
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#include "cursor.h"
|
||||
#endif
|
||||
|
||||
|
@ -870,10 +871,10 @@ RecordADeviceEvent(pcbl, nulldata, calldata)
|
|||
{
|
||||
xEvent swappedEvent;
|
||||
xEvent *pEvToRecord = pev;
|
||||
#ifdef PANORAMIX
|
||||
#ifdef XINERAMA
|
||||
xEvent shiftedEvent;
|
||||
|
||||
if (!noPanoramiXExtension &&
|
||||
if (!noXineramaExtension &&
|
||||
(pev->u.u.type == MotionNotify ||
|
||||
pev->u.u.type == ButtonPress ||
|
||||
pev->u.u.type == ButtonRelease ||
|
||||
|
@ -882,14 +883,14 @@ RecordADeviceEvent(pcbl, nulldata, calldata)
|
|||
int scr = XineramaGetCursorScreen();
|
||||
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
||||
shiftedEvent.u.keyButtonPointer.rootX +=
|
||||
panoramiXdataPtr[scr].x -
|
||||
panoramiXdataPtr[0].x;
|
||||
xineramaDataPtr[scr].x -
|
||||
xineramaDataPtr[0].x;
|
||||
shiftedEvent.u.keyButtonPointer.rootY +=
|
||||
panoramiXdataPtr[scr].y -
|
||||
panoramiXdataPtr[0].y;
|
||||
xineramaDataPtr[scr].y -
|
||||
xineramaDataPtr[0].y;
|
||||
pEvToRecord = &shiftedEvent;
|
||||
}
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
|
||||
if (pContext->pRecordingClient->swapped)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/*
|
||||
* $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
|
||||
AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
void PanoramiXRenderInit (void);
|
||||
void PanoramiXRenderReset (void);
|
||||
#ifdef XINERAMA
|
||||
void XineramaRenderInit (void);
|
||||
void XineramaRenderReset (void);
|
||||
#endif
|
||||
|
||||
#endif /* _PICTURESTR_H_ */
|
||||
|
|
197
render/render.c
197
render/render.c
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/*
|
||||
* $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);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if (noPanoramiXExtension)
|
||||
#ifdef XINERAMA
|
||||
if (noXineramaExtension)
|
||||
numScreens = screenInfo.numScreens;
|
||||
else
|
||||
numScreens = ((xConnSetup *)ConnectionInfo)->numRoots;
|
||||
|
@ -2283,9 +2284,9 @@ SProcRenderDispatch (ClientPtr client)
|
|||
return BadRequest;
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
|
||||
#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\
|
||||
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;
|
||||
|
||||
static int
|
||||
PanoramiXRenderCreatePicture (ClientPtr client)
|
||||
XineramaRenderCreatePicture (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderCreatePictureReq);
|
||||
PanoramiXRes *refDraw, *newPict;
|
||||
XineramaRes *refDraw, *newPict;
|
||||
int result = Success, j;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
|
||||
if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
|
||||
if(!(refDraw = (XineramaRes *)SecurityLookupIDByClass(
|
||||
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
|
||||
return BadDrawable;
|
||||
if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
|
||||
if(!(newPict = (XineramaRes *) xalloc(sizeof(XineramaRes))))
|
||||
return BadAlloc;
|
||||
newPict->type = XRT_PICTURE;
|
||||
newPict->info[0].id = stuff->pid;
|
||||
|
@ -2331,13 +2332,13 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
|||
else
|
||||
newPict->u.pict.root = FALSE;
|
||||
|
||||
for(j = 1; j < PanoramiXNumScreens; j++)
|
||||
for(j = 1; j < XineramaNumScreens; j++)
|
||||
newPict->info[j].id = FakeClientID(client->index);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->pid = newPict->info[j].id;
|
||||
stuff->drawable = refDraw->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderCreatePicture]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2350,9 +2351,9 @@ PanoramiXRenderCreatePicture (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderChangePicture (ClientPtr client)
|
||||
XineramaRenderChangePicture (ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *pict;
|
||||
XineramaRes *pict;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderChangePictureReq);
|
||||
|
||||
|
@ -2363,7 +2364,7 @@ PanoramiXRenderChangePicture (ClientPtr client)
|
|||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderChangePicture]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2371,11 +2372,11 @@ PanoramiXRenderChangePicture (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
|
||||
XineramaRenderSetPictureClipRectangles (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureClipRectanglesReq);
|
||||
int result = Success, j;
|
||||
PanoramiXRes *pict;
|
||||
XineramaRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
|
||||
|
||||
|
@ -2384,7 +2385,7 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
|
|||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderSetPictureClipRectangles]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2392,11 +2393,11 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderSetPictureTransform (ClientPtr client)
|
||||
XineramaRenderSetPictureTransform (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureTransformReq);
|
||||
int result = Success, j;
|
||||
PanoramiXRes *pict;
|
||||
XineramaRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
|
||||
|
||||
|
@ -2405,7 +2406,7 @@ PanoramiXRenderSetPictureTransform (ClientPtr client)
|
|||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderSetPictureTransform]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2413,11 +2414,11 @@ PanoramiXRenderSetPictureTransform (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderSetPictureFilter (ClientPtr client)
|
||||
XineramaRenderSetPictureFilter (ClientPtr client)
|
||||
{
|
||||
REQUEST(xRenderSetPictureFilterReq);
|
||||
int result = Success, j;
|
||||
PanoramiXRes *pict;
|
||||
XineramaRes *pict;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
|
||||
|
||||
|
@ -2426,7 +2427,7 @@ PanoramiXRenderSetPictureFilter (ClientPtr client)
|
|||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderSetPictureFilter]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2434,9 +2435,9 @@ PanoramiXRenderSetPictureFilter (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderFreePicture (ClientPtr client)
|
||||
XineramaRenderFreePicture (ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *pict;
|
||||
XineramaRes *pict;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderFreePictureReq);
|
||||
|
||||
|
@ -2450,7 +2451,7 @@ PanoramiXRenderFreePicture (ClientPtr client)
|
|||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderFreePicture]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2461,9 +2462,9 @@ PanoramiXRenderFreePicture (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderComposite (ClientPtr client)
|
||||
XineramaRenderComposite (ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *msk, *dst;
|
||||
XineramaRes *src, *msk, *dst;
|
||||
int result = Success, j;
|
||||
xRenderCompositeReq orig;
|
||||
REQUEST(xRenderCompositeReq);
|
||||
|
@ -2483,25 +2484,25 @@ PanoramiXRenderComposite (ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
if (src->u.pict.root)
|
||||
{
|
||||
stuff->xSrc = orig.xSrc - panoramiXdataPtr[j].x;
|
||||
stuff->ySrc = orig.ySrc - panoramiXdataPtr[j].y;
|
||||
stuff->xSrc = orig.xSrc - xineramaDataPtr[j].x;
|
||||
stuff->ySrc = orig.ySrc - xineramaDataPtr[j].y;
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
if (dst->u.pict.root)
|
||||
{
|
||||
stuff->xDst = orig.xDst - panoramiXdataPtr[j].x;
|
||||
stuff->yDst = orig.yDst - panoramiXdataPtr[j].y;
|
||||
stuff->xDst = orig.xDst - xineramaDataPtr[j].x;
|
||||
stuff->yDst = orig.yDst - xineramaDataPtr[j].y;
|
||||
}
|
||||
if (msk)
|
||||
{
|
||||
stuff->mask = msk->info[j].id;
|
||||
if (msk->u.pict.root)
|
||||
{
|
||||
stuff->xMask = orig.xMask - panoramiXdataPtr[j].x;
|
||||
stuff->yMask = orig.yMask - panoramiXdataPtr[j].y;
|
||||
stuff->xMask = orig.xMask - xineramaDataPtr[j].x;
|
||||
stuff->yMask = orig.yMask - xineramaDataPtr[j].y;
|
||||
}
|
||||
}
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderComposite]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
|
@ -2509,9 +2510,9 @@ PanoramiXRenderComposite (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderCompositeGlyphs (ClientPtr client)
|
||||
XineramaRenderCompositeGlyphs (ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderCompositeGlyphsReq);
|
||||
xGlyphElt origElt, *elt;
|
||||
|
@ -2534,16 +2535,16 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
if (src->u.pict.root)
|
||||
{
|
||||
stuff->xSrc = xSrc - panoramiXdataPtr[j].x;
|
||||
stuff->ySrc = ySrc - panoramiXdataPtr[j].y;
|
||||
stuff->xSrc = xSrc - xineramaDataPtr[j].x;
|
||||
stuff->ySrc = ySrc - xineramaDataPtr[j].y;
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
if (dst->u.pict.root)
|
||||
{
|
||||
elt->deltax = origElt.deltax - panoramiXdataPtr[j].x;
|
||||
elt->deltay = origElt.deltay - panoramiXdataPtr[j].y;
|
||||
elt->deltax = origElt.deltax - xineramaDataPtr[j].x;
|
||||
elt->deltay = origElt.deltay - xineramaDataPtr[j].y;
|
||||
}
|
||||
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
|
||||
result = (*XineramaSaveRenderVector[stuff->renderReqType]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
}
|
||||
|
@ -2552,9 +2553,9 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderFillRectangles (ClientPtr client)
|
||||
XineramaRenderFillRectangles (ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *dst;
|
||||
XineramaRes *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderFillRectanglesReq);
|
||||
char *extra;
|
||||
|
@ -2572,8 +2573,8 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
|||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root)
|
||||
{
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
xRectangle *rects = (xRectangle *) (stuff + 1);
|
||||
|
@ -2588,7 +2589,7 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
|||
}
|
||||
}
|
||||
stuff->dst = dst->info[j].id;
|
||||
result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client);
|
||||
result = (*XineramaSaveRenderVector[X_RenderFillRectangles]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
DEALLOCATE_LOCAL(extra);
|
||||
|
@ -2598,9 +2599,9 @@ PanoramiXRenderFillRectangles (ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderTrapezoids(ClientPtr client)
|
||||
XineramaRenderTrapezoids(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderTrapezoidsReq);
|
||||
char *extra;
|
||||
|
@ -2622,8 +2623,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
|
||||
|
@ -2648,7 +2649,7 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderTrapezoids]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2660,9 +2661,9 @@ PanoramiXRenderTrapezoids(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderTriangles(ClientPtr client)
|
||||
XineramaRenderTriangles(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderTrianglesReq);
|
||||
char *extra;
|
||||
|
@ -2684,8 +2685,8 @@ PanoramiXRenderTriangles(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
xTriangle *tri = (xTriangle *) (stuff + 1);
|
||||
|
@ -2706,7 +2707,7 @@ PanoramiXRenderTriangles(ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderTriangles]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderTriangles]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2718,9 +2719,9 @@ PanoramiXRenderTriangles(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderTriStrip(ClientPtr client)
|
||||
XineramaRenderTriStrip(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderTriStripReq);
|
||||
char *extra;
|
||||
|
@ -2742,8 +2743,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
||||
|
@ -2760,7 +2761,7 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderTriStrip]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2772,9 +2773,9 @@ PanoramiXRenderTriStrip(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderTriFan(ClientPtr client)
|
||||
XineramaRenderTriFan(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderTriFanReq);
|
||||
char *extra;
|
||||
|
@ -2796,8 +2797,8 @@ PanoramiXRenderTriFan(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
|
||||
|
@ -2814,7 +2815,7 @@ PanoramiXRenderTriFan(ClientPtr client)
|
|||
stuff->src = src->info[j].id;
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderTriFan]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderTriFan]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2828,9 +2829,9 @@ PanoramiXRenderTriFan(ClientPtr client)
|
|||
#if 0 /* Not implemented yet */
|
||||
|
||||
static int
|
||||
PanoramiXRenderColorTrapezoids(ClientPtr client)
|
||||
XineramaRenderColorTrapezoids(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderColorTrapezoidsReq);
|
||||
char *extra;
|
||||
|
@ -2850,8 +2851,8 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
....;
|
||||
|
@ -2860,7 +2861,7 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
|
|||
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderColorTrapezoids]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderColorTrapezoids]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2872,9 +2873,9 @@ PanoramiXRenderColorTrapezoids(ClientPtr client)
|
|||
}
|
||||
|
||||
static int
|
||||
PanoramiXRenderColorTriangles(ClientPtr client)
|
||||
XineramaRenderColorTriangles(ClientPtr client)
|
||||
{
|
||||
PanoramiXRes *src, *dst;
|
||||
XineramaRes *src, *dst;
|
||||
int result = Success, j;
|
||||
REQUEST(xRenderColorTrianglesReq);
|
||||
char *extra;
|
||||
|
@ -2894,8 +2895,8 @@ PanoramiXRenderColorTriangles(ClientPtr client)
|
|||
FOR_NSCREENS_FORWARD(j) {
|
||||
if (j) memcpy (stuff + 1, extra, extra_len);
|
||||
if (dst->u.pict.root) {
|
||||
int x_off = panoramiXdataPtr[j].x;
|
||||
int y_off = panoramiXdataPtr[j].y;
|
||||
int x_off = xineramaDataPtr[j].x;
|
||||
int y_off = xineramaDataPtr[j].y;
|
||||
|
||||
if(x_off || y_off) {
|
||||
....;
|
||||
|
@ -2904,7 +2905,7 @@ PanoramiXRenderColorTriangles(ClientPtr client)
|
|||
|
||||
stuff->dst = dst->info[j].id;
|
||||
result =
|
||||
(*PanoramiXSaveRenderVector[X_RenderColorTriangles]) (client);
|
||||
(*XineramaSaveRenderVector[X_RenderColorTriangles]) (client);
|
||||
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
@ -2918,40 +2919,40 @@ PanoramiXRenderColorTriangles(ClientPtr client)
|
|||
#endif
|
||||
|
||||
void
|
||||
PanoramiXRenderInit (void)
|
||||
XineramaRenderInit (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource);
|
||||
for (i = 0; i < RenderNumberRequests; i++)
|
||||
PanoramiXSaveRenderVector[i] = ProcRenderVector[i];
|
||||
XineramaSaveRenderVector[i] = ProcRenderVector[i];
|
||||
/*
|
||||
* Stuff in Xinerama aware request processing hooks
|
||||
*/
|
||||
ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture;
|
||||
ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture;
|
||||
ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform;
|
||||
ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter;
|
||||
ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles;
|
||||
ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture;
|
||||
ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs8] = PanoramiXRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles;
|
||||
ProcRenderVector[X_RenderCreatePicture] = XineramaRenderCreatePicture;
|
||||
ProcRenderVector[X_RenderChangePicture] = XineramaRenderChangePicture;
|
||||
ProcRenderVector[X_RenderSetPictureTransform] = XineramaRenderSetPictureTransform;
|
||||
ProcRenderVector[X_RenderSetPictureFilter] = XineramaRenderSetPictureFilter;
|
||||
ProcRenderVector[X_RenderSetPictureClipRectangles] = XineramaRenderSetPictureClipRectangles;
|
||||
ProcRenderVector[X_RenderFreePicture] = XineramaRenderFreePicture;
|
||||
ProcRenderVector[X_RenderComposite] = XineramaRenderComposite;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs8] = XineramaRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs16] = XineramaRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderCompositeGlyphs32] = XineramaRenderCompositeGlyphs;
|
||||
ProcRenderVector[X_RenderFillRectangles] = XineramaRenderFillRectangles;
|
||||
|
||||
ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids;
|
||||
ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles;
|
||||
ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip;
|
||||
ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan;
|
||||
ProcRenderVector[X_RenderTrapezoids] = XineramaRenderTrapezoids;
|
||||
ProcRenderVector[X_RenderTriangles] = XineramaRenderTriangles;
|
||||
ProcRenderVector[X_RenderTriStrip] = XineramaRenderTriStrip;
|
||||
ProcRenderVector[X_RenderTriFan] = XineramaRenderTriFan;
|
||||
}
|
||||
|
||||
void
|
||||
PanoramiXRenderReset (void)
|
||||
XineramaRenderReset (void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < RenderNumberRequests; i++)
|
||||
ProcRenderVector[i] = PanoramiXSaveRenderVector[i];
|
||||
ProcRenderVector[i] = XineramaSaveRenderVector[i];
|
||||
}
|
||||
|
||||
#endif /* PANORAMIX */
|
||||
#endif /* XINERAMA */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* $XdotOrg$ */
|
||||
/* $Xorg: ddxFakeMtn.c,v 1.3 2000/08/17 19:53:45 cpqbld Exp $ */
|
||||
/************************************************************
|
||||
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
|
||||
|
@ -37,9 +38,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "XKBsrv.h"
|
||||
#include "XI.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
#ifdef XINERAMA
|
||||
#include "xinerama.h"
|
||||
#include "xineramaSrv.h"
|
||||
#endif
|
||||
|
||||
#include "mipointer.h"
|
||||
|
@ -54,8 +55,8 @@ ScreenPtr pScreen, oldScreen;
|
|||
GetSpritePosition(&oldX, &oldY);
|
||||
pScreen = oldScreen = GetSpriteWindow()->drawable.pScreen;
|
||||
|
||||
#ifdef PANORAMIX
|
||||
if (!noPanoramiXExtension) {
|
||||
#ifdef XINERAMA
|
||||
if (!noXineramaExtension) {
|
||||
BoxRec box;
|
||||
int i;
|
||||
|
||||
|
@ -92,8 +93,8 @@ ScreenPtr pScreen, oldScreen;
|
|||
}
|
||||
}
|
||||
}
|
||||
oldX -= panoramiXdataPtr[pScreen->myNum].x;
|
||||
oldY -= panoramiXdataPtr[pScreen->myNum].y;
|
||||
oldX -= xineramaDataPtr[pScreen->myNum].x;
|
||||
oldY -= xineramaDataPtr[pScreen->myNum].y;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user