Don't allow both RandR XINERAMA and pseudoramiX XINERAMA extensions to register

Prevent RRXinerama from activating if PseudoramiX is, so we don't get XINERAMA
listed twice in the list of extensions.  I think this is otherwise benign, as
the PseudoramiX XINERAMA gets registered first and thus handles all requests.

Perhaps AddExtension() ought to warn us if the extension name is already
registered?

This appears to be a long-standing bug seen in XQuartz, and now in XWin as well.

Future work: Perhaps since RRXinerama isn't actually doing anything useful but
faking it when we have one screen, it seems that the PseudoramiX code could be
also used in that case.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2012-07-12 02:00:43 +01:00
parent 234fe39180
commit 95e83ff87a
2 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#define DEBUG_LOG PseudoramiXDebug
Bool noPseudoramiXExtension = FALSE;
extern Bool noRRXineramaExtension;
extern int
ProcPanoramiXQueryVersion(ClientPtr client);
@ -190,6 +191,9 @@ PseudoramiXExtensionInit(void)
}
}
/* Do not allow RRXinerama to initialize if we did */
noRRXineramaExtension = success;
if (!success) {
ErrorF("%s Extension (PseudoramiX) failed to initialize\n",
PANORAMIX_PROTOCOL_NAME);

View File

@ -84,6 +84,8 @@ static int ProcRRXineramaIsActive(ClientPtr client);
static int ProcRRXineramaQueryScreens(ClientPtr client);
static int SProcRRXineramaDispatch(ClientPtr client);
Bool noRRXineramaExtension = FALSE;
/* Proc */
int
@ -488,6 +490,9 @@ RRXineramaExtensionInit(void)
return;
#endif
if (noRRXineramaExtension)
return;
/*
* Xinerama isn't capable enough to have multiple protocol screens each
* with their own output geometry. So if there's more than one protocol