diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-07-12 02:00:43 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-03-24 14:46:39 +0000 |
commit | 95e83ff87ab0149ab01c9299524dfbe37d9b21a2 (patch) | |
tree | de6707defaee16c05d3bb4d90e2d362dd60e0ed9 | |
parent | 234fe391802b114e96d60a6630f717f8e4fb726c (diff) |
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>
-rw-r--r-- | pseudoramiX/pseudoramiX.c | 4 | ||||
-rw-r--r-- | randr/rrxinerama.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c index d0e2603b9..e59ca1312 100644 --- a/pseudoramiX/pseudoramiX.c +++ b/pseudoramiX/pseudoramiX.c @@ -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); diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index b336bd7cd..36632c7c7 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -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 |