From d9c3a724972cb978660a00e1f9505d914e9a6b23 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 21 Oct 2017 02:12:01 +0200 Subject: Xext: lift panoramiX to xorg-xserver-7.1/1.1 state It also reintroduces a missed hack (undocumented commandline switch -disablexineramaextension to fool clients into thinking that Xinerama is disabled even though it is not). That hack had been dropped in d26930d59838e2a8305c66b67aaa163db157920c intentionally. --- nx-X11/programs/Xserver/Xext/panoramiX.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index e720965d4..e36d04d9e 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -72,10 +72,10 @@ static unsigned char PanoramiXReqCode = 0; int PanoramiXPixWidth = 0; int PanoramiXPixHeight = 0; -int PanoramiXNumScreens = 0; +_X_EXPORT int PanoramiXNumScreens = 0; -PanoramiXData *panoramiXdataPtr = NULL; -RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL}; +_X_EXPORT PanoramiXData *panoramiXdataPtr = NULL; +RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL}; static int PanoramiXNumDepths; static DepthPtr PanoramiXDepths; @@ -83,13 +83,13 @@ static int PanoramiXNumVisuals; static VisualPtr PanoramiXVisuals; /* We support at most 256 visuals */ -XID *PanoramiXVisualTable = NULL; +_X_EXPORT XID *PanoramiXVisualTable = NULL; -unsigned long XRC_DRAWABLE; -unsigned long XRT_WINDOW; -unsigned long XRT_PIXMAP; -unsigned long XRT_GC; -unsigned long XRT_COLORMAP; +_X_EXPORT unsigned long XRC_DRAWABLE; +_X_EXPORT unsigned long XRT_WINDOW; +_X_EXPORT unsigned long XRT_PIXMAP; +_X_EXPORT unsigned long XRT_GC; +_X_EXPORT unsigned long XRT_COLORMAP; /* * Function prototypes @@ -330,7 +330,7 @@ XineramaDestroyClip(GCPtr pGC) -int +_X_EXPORT int XineramaDeleteResource(void * data, XID id) { free(data); @@ -411,7 +411,7 @@ typedef struct _connect_callback_list { static XineramaConnectionCallbackList *ConnectionCallbackList = NULL; -Bool +_X_EXPORT Bool XineramaRegisterConnectionBlockCallback(void (*func)(void)) { XineramaConnectionCallbackList *newlist; @@ -1037,7 +1037,16 @@ ProcXineramaIsActive(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; +#if 1 + { + /* The following hack fools clients into thinking that Xinerama + * is disabled even though it is not. */ + extern Bool PanoramiXExtensionDisabledHack; + rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack; + } +#else rep.state = !noPanoramiXExtension; +#endif if (client->swapped) { swaps (&rep.sequenceNumber); swapl (&rep.length); -- cgit v1.2.3