diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-18 19:32:17 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-18 19:32:17 +0000 |
commit | 4b75c7f6358b28978b05ffa4b73853d936454f50 (patch) | |
tree | fcaa243699c1f97e88799d303c0cc81a06b08de4 /Xext | |
parent | 8a7481a27496c842ec2ef5bac5e4d0b5e6279deb (diff) |
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.
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/saver.c | 43 | ||||
-rw-r--r-- | Xext/shape.c | 67 | ||||
-rw-r--r-- | Xext/shm.c | 75 | ||||
-rw-r--r-- | Xext/xtest.c | 25 | ||||
-rw-r--r-- | Xext/xvdisp.c | 111 | ||||
-rw-r--r-- | Xext/xvmain.c | 11 |
6 files changed, 173 insertions, 159 deletions
diff --git a/Xext/saver.c b/Xext/saver.c index 944009773..cc4992ee1 100644 --- a/Xext/saver.c +++ b/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); } diff --git a/Xext/shape.c b/Xext/shape.c index 956a8ebfc..4774a0562 100644 --- a/Xext/shape.c +++ b/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); diff --git a/Xext/shm.c b/Xext/shm.c index 9591eab54..2ed8699f0 100644 --- a/Xext/shm.c +++ b/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,9 +1083,11 @@ 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; pMap->drawable.id = stuff->pid; @@ -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: diff --git a/Xext/xtest.c b/Xext/xtest.c index 89bcae3a4..0dec3b623 100644 --- a/Xext/xtest.c +++ b/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()) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 40313470c..14b8c99e2 100644 --- a/Xext/xvdisp.c +++ b/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 diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 2c3f484bd..866fcd7da 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -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; |