Commit c6c6d0de authored by Egbert Eich's avatar Egbert Eich

Merged changes from RELEASE-1 branch

parent 629c3792
......@@ -344,7 +344,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
if ( atof( string ) > atof( GLServerVersion ) ) {
buf = __glXMalloc( __glXStrlen( string )
+ __glXStrlen( GLServerVersion )
+ 3 );
+ 4 );
if ( buf == NULL ) {
string = GLServerVersion;
}
......
/* $XdotOrg: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.1.4.2 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.6tsi Exp $ */
/*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
......@@ -77,7 +77,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h>
#include "colormapst.h"
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#include "cursor.h"
......@@ -1559,7 +1559,7 @@ void XETrapStampAndMail(xEvent *x_event)
/* Copy the event information into our local memory */
(void)memcpy(&(data.u.event),x_event,sizeof(xEvent));
#ifdef XINERAMA
#ifdef PANORAMIX
if (!noPanoramiXExtension &&
(data.u.event.u.u.type == MotionNotify ||
data.u.event.u.u.type == ButtonPress ||
......
......@@ -27,6 +27,7 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
......
/* $XdotOrg: xc/programs/Xserver/Xext/saver.c,v 1.1.4.2 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/*
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
*
......@@ -47,7 +47,7 @@ in this Software without prior written authorization from the X Consortium.
#include "gcstruct.h"
#include "cursorstr.h"
#include "colormapst.h"
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
......@@ -677,7 +677,7 @@ ScreenSaverHandle (pScreen, xstate, force)
ret = TRUE;
}
#ifdef XINERAMA
#ifdef PANORAMIX
if(noPanoramiXExtension || !pScreen->myNum)
#endif
SendScreenSaverNotify (pScreen, state, force);
......@@ -1195,7 +1195,7 @@ ScreenSaverUnsetAttributes (ClientPtr client)
static int
ProcScreenSaverSetAttributes (ClientPtr client)
{
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
REQUEST(xScreenSaverSetAttributesReq);
PanoramiXRes *draw;
......@@ -1274,7 +1274,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
static int
ProcScreenSaverUnsetAttributes (ClientPtr client)
{
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
REQUEST(xScreenSaverUnsetAttributesReq);
PanoramiXRes *draw;
......
/* $XdotOrg: xc/programs/Xserver/Xext/shape.c,v 1.1.4.3 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.18 2003/10/28 23:08:43 tsi Exp $ */
/************************************************************
......@@ -113,7 +113,7 @@ static DISPATCH_PROC(SProcShapeQueryVersion);
static DISPATCH_PROC(SProcShapeRectangles);
static DISPATCH_PROC(SProcShapeSelectInput);
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
......@@ -376,9 +376,9 @@ ProcShapeRectangles (client)
stuff->xOff, stuff->yOff, createDefault);
}
#ifdef XINERAMA
#ifdef PANORAMIX
static int
ProcXineramaShapeRectangles(
ProcPanoramiXShapeRectangles(
register ClientPtr client)
{
REQUEST(xShapeRectanglesReq);
......@@ -465,9 +465,9 @@ ProcShapeMask (client)
stuff->xOff, stuff->yOff, createDefault);
}
#ifdef XINERAMA
#ifdef PANORAMIX
static int
ProcXineramaShapeMask(
ProcPanoramiXShapeMask(
register ClientPtr client)
{
REQUEST(xShapeMaskReq);
......@@ -580,9 +580,9 @@ ProcShapeCombine (client)
}
#ifdef XINERAMA
#ifdef PANORAMIX
static int
ProcXineramaShapeCombine(
ProcPanoramiXShapeCombine(
register ClientPtr client)
{
REQUEST(xShapeCombineReq);
......@@ -649,9 +649,9 @@ ProcShapeOffset (client)
}
#ifdef XINERAMA
#ifdef PANORAMIX
static int
ProcXineramaShapeOffset(
ProcPanoramiXShapeOffset(
register ClientPtr client)
{
REQUEST(xShapeOffsetReq);
......@@ -1065,30 +1065,30 @@ ProcShapeDispatch (client)
case X_ShapeQueryVersion:
return ProcShapeQueryVersion (client);
case X_ShapeRectangles:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShapeRectangles (client);
return ProcPanoramiXShapeRectangles (client);
else
#endif
return ProcShapeRectangles (client);
case X_ShapeMask:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShapeMask (client);
return ProcPanoramiXShapeMask (client);
else
#endif
return ProcShapeMask (client);
case X_ShapeCombine:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShapeCombine (client);
return ProcPanoramiXShapeCombine (client);
else
#endif
return ProcShapeCombine (client);
case X_ShapeOffset:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShapeOffset (client);
return ProcPanoramiXShapeOffset (client);
else
#endif
return ProcShapeOffset (client);
......
......@@ -62,7 +62,7 @@ in this Software without prior written authorization from The Open Group.
#include "xf86_ansic.h"
#endif
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
......@@ -560,9 +560,9 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
}
#ifdef XINERAMA
#ifdef PANORAMIX
static int
ProcXineramaShmPutImage(register ClientPtr client)
ProcPanoramiXShmPutImage(register ClientPtr client)
{
int j, result = 0, orig_x, orig_y;
PanoramiXRes *draw, *gc;
......@@ -600,7 +600,7 @@ ProcXineramaShmPutImage(register ClientPtr client)
}
static int
ProcXineramaShmGetImage(ClientPtr client)
ProcPanoramiXShmGetImage(ClientPtr client)
{
PanoramiXRes *draw;
DrawablePtr drawables[MAXSCREENS];
......@@ -714,7 +714,7 @@ ProcXineramaShmGetImage(ClientPtr client)
}
static int
ProcXineramaShmCreatePixmap(
ProcPanoramiXShmCreatePixmap(
register ClientPtr client)
{
ScreenPtr pScreen = NULL;
......@@ -1080,10 +1080,8 @@ 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;
......@@ -1110,21 +1108,21 @@ ProcShmDispatch (client)
case X_ShmDetach:
return ProcShmDetach(client);
case X_ShmPutImage:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShmPutImage(client);
return ProcPanoramiXShmPutImage(client);
#endif
return ProcShmPutImage(client);
case X_ShmGetImage:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShmGetImage(client);
return ProcPanoramiXShmGetImage(client);
#endif
return ProcShmGetImage(client);
case X_ShmCreatePixmap:
#ifdef XINERAMA
#ifdef PANORAMIX
if ( !noPanoramiXExtension )
return ProcXineramaShmCreatePixmap(client);
return ProcPanoramiXShmCreatePixmap(client);
#endif
return ProcShmCreatePixmap(client);
default:
......
/* $XdotOrg: xc/programs/Xserver/Xext/xtest.c,v 1.1.4.3 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
/*
......@@ -64,7 +64,7 @@ static unsigned char XTestReqCode;
extern int DeviceValuator;
#endif /* XINPUT */
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
......@@ -391,7 +391,7 @@ ProcXTestFakeInput(client)
return BadValue;
}
#ifdef XINERAMA
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
ScreenPtr pScreen = root->drawable.pScreen;
BoxRec box;
......@@ -426,7 +426,7 @@ ProcXTestFakeInput(client)
else if (ev->u.keyButtonPointer.rootY >= root->drawable.height)
ev->u.keyButtonPointer.rootY = root->drawable.height - 1;
#ifdef XINERAMA
#ifdef PANORAMIX
if ((!noPanoramiXExtension
&& root->drawable.pScreen->myNum != XineramaGetCursorScreen())
|| (noPanoramiXExtension && root != GetCurrentRootWindow()))
......
/* $XdotOrg: xc/programs/Xserver/Xext/xvdisp.c,v 1.1.4.3 2004/02/25 21:46:33 kaleb Exp $ */
/* $XdotOrg$ */
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
......@@ -73,7 +73,7 @@ SOFTWARE.
#include "xvdisp.h"
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
......@@ -233,14 +233,14 @@ ProcXvDispatch(ClientPtr client)
case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client));
case xv_QueryEncodings: return(ProcXvQueryEncodings(client));
case xv_PutVideo:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvPutVideo(client));
else
#endif
return(ProcXvPutVideo(client));
case xv_PutStill:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvPutStill(client));
else
......@@ -253,14 +253,14 @@ ProcXvDispatch(ClientPtr client)
case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client));
case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client));
case xv_StopVideo:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvStopVideo(client));
else
#endif
return(ProcXvStopVideo(client));
case xv_SetPortAttribute:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvSetPortAttribute(client));
else
......@@ -270,7 +270,7 @@ ProcXvDispatch(ClientPtr client)
case xv_QueryBestSize: return(ProcXvQueryBestSize(client));
case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client));
case xv_PutImage:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvPutImage(client));
else
......@@ -278,7 +278,7 @@ ProcXvDispatch(ClientPtr client)
return(ProcXvPutImage(client));
#ifdef MITSHM
case xv_ShmPutImage:
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension)
return(XineramaXvShmPutImage(client));
else
......@@ -1863,7 +1863,7 @@ SWriteListImageFormatsReply(
}
#ifdef XINERAMA
#ifdef PANORAMIX
......@@ -2079,8 +2079,7 @@ XineramaXvPutStill(ClientPtr client)
client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) &&
(stuff->drawable == WindowTable[0]->drawable.id);
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
x = stuff->drw_x;
y = stuff->drw_y;
......
/* $XdotOrg: xc/programs/Xserver/Xext/xvmain.c,v 1.1.4.2 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
......@@ -99,7 +99,7 @@ SOFTWARE.
#include "xf86_ansic.h"
#endif
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#include "xvdisp.h"
......@@ -172,7 +172,7 @@ XvExtensionInit()
ErrorF("XvExtensionInit: Unable to allocate screen private index\n");
return;
}
#ifdef XINERAMA
#ifdef PANORAMIX
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif
XvScreenGeneration = serverGeneration;
......@@ -271,7 +271,7 @@ XvScreenInit(ScreenPtr pScreen)
ErrorF("XvScreenInit: Unable to allocate screen private index\n");
return BadAlloc;
}
#ifdef XINERAMA
#ifdef PANORAMIX
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif
XvScreenGeneration = serverGeneration;
......
/* $XdotOrg: xc/programs/Xserver/cfb/cfbpntwin.c,v 1.1.4.3 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $Xorg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */
/***********************************************************
......@@ -59,11 +59,9 @@ SOFTWARE.
#include "cfbmskbits.h"
#include "mi.h"
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
extern Bool noPanoramiXExtension;
extern WindowPtr *WindowTable;
#endif
void
......@@ -100,11 +98,9 @@ cfbPaintWindow(pWin, pRegion, what)
}
else
{
#ifndef NO_XINERAMA_PORT
int xorg = pWin->drawable.x;
int yorg = pWin->drawable.y;
#endif
#ifdef XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pWin) {
......@@ -117,11 +113,7 @@ 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:
......@@ -149,20 +141,16 @@ 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 XINERAMA
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
int index = pWin->drawable.pScreen->myNum;
if(WindowTable[index] == pBgWin) {
......@@ -176,12 +164,7 @@ 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;
}
......
/* $XdotOrg: xc/programs/Xserver/dbe/dbe.c,v 1.1.4.2 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $Xorg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */
/******************************************************************************
*
......@@ -1821,8 +1821,7 @@ DbeExtensionInit()
int nStubbedScreens = 0;
Bool ddxInitSuccess;
#ifdef XINERAMA
extern Bool noPanoramiXExtension;
#ifdef PANORAMIX
if(!noPanoramiXExtension) return;
#endif
......
/* $XdotOrg: xc/programs/Xserver/dix/colormap.c,v 1.1.4.3 2003/12/18 19:29:12 kaleb Exp $ */
/* $XdotOrg$ */
/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.11 2003/11/03 05:10:59 tsi Exp $ */
/***********************************************************
......@@ -62,11 +62,6 @@ SOFTWARE.
#ifdef LBX
#include "lbxserve.h"
#endif
#ifdef XINERAMA
#include "panoramiX.h"
#include "panoramiXsrv.h"
extern Bool noPanoramiXExtension;
#endif
extern XID clientErrorValue;
extern int colormapPrivateCount;
......@@ -480,23 +475,16 @@ TellNoMap (pwin, pmid)
if (wColormap(pwin) == *pmid)
{
#ifdef XINERAMA
/*
* Only deliver event for Screen 0 when Xinerama enabled
*/
if (noPanoramiXExtension ||
(!noPanoramiXExtension && !(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;
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
#ifdef XINERAMA
}
#ifdef PANORAMIX
if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum)
#endif
DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL);
if (pwin->optional) {
pwin->optional->colormap = None;
CheckWindowOptionalNeed (pwin);
......@@ -515,12 +503,9 @@ TellLostMap (pwin, value)
Colormap *pmid = (Colormap *)value;
xEvent xE;
#ifdef XINERAMA
/*
* Only deliver event for Screen 0 when Xinerama enabled
*/
if (noPanoramiXExtension ||
(!noPanoramiXExtension && !(pwin->drawable.pScreen->myNum)))
#ifdef PANORAMIX
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
return WT_STOPWALKING;
#endif
if (wColormap(pwin) == *pmid)
{
......@@ -545,12 +530,9 @@ TellGainedMap (pwin, value)
Colormap *pmid = (Colormap *)value;
xEvent xE;
#ifdef XINERAMA
/*
* Only deliver event for Screen 0 when Xinerama enabled
*/
if (noPanoramiXExtension ||
(!noPanoramiXExtension && !(pwin->drawable.pScreen->myNum)))
#ifdef PANORAMIX
if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
return WT_STOPWALKING;
#endif
if (wColormap (pwin) == *pmid)
{
......
/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.1.4.5 2004/03/05 13:39:57 eich Exp $ */
/* $XdotOrg$ */
/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
/************************************************************
......@@ -47,7 +47,7 @@ SOFTWARE.
********************************************************/
/* The Xinerama components contained the following notice */
/* The panoramix components contained the following notice */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
......@@ -75,9 +75,10 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.32 2003/11/10 18:21:45 tsi Exp $ */
#ifdef XINERAMA_DEBUG
#ifdef PANORAMIX_DEBUG
#include <stdio.h>
int ProcInitialConnection();
#endif
......@@ -98,7 +99,7 @@ int ProcInitialConnection();
#include "dispatch.h"
#include "swaprep.h"
#include "swapreq.h"
#ifdef XINERAMA
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
......@@ -2648,7 +2649,7 @@ ProcAllocColor(client)
else
return (retval);
}
#ifdef XINERAMA
#ifdef PANORAMIX