summaryrefslogtreecommitdiff
path: root/src/vmware.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-11-23 10:49:33 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2011-11-25 16:59:46 +0100
commit2e8aac7031a83f507169f6fe42924c51bdaf7326 (patch)
treeb11c569c28616e3ff316fc4f4fb176851b927b1e /src/vmware.c
parent31e80b2a609631d85341025d7f2d0fb818f386f5 (diff)
vmwlegacy: Accept option "GuiLayout" as a synonym for "staticXinerama"
It's more user-friendly and in line with what it's being used for in the vmwgfx driver. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'src/vmware.c')
-rw-r--r--src/vmware.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/vmware.c b/src/vmware.c
index 0f3e36f..70c6730 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -344,13 +344,15 @@ VMWAREParseTopologyElement(ScrnInfoPtr pScrn,
static xXineramaScreenInfo *
VMWAREParseTopologyString(ScrnInfoPtr pScrn,
const char *topology,
- unsigned int *retNumOutputs)
+ unsigned int *retNumOutputs,
+ const char info[])
{
xXineramaScreenInfo *extents = NULL;
unsigned int numOutputs = 0;
const char *str = topology;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing static Xinerama topology: Starting...\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing %s topology: Starting...\n",
+ info);
do {
unsigned int x, y, width, height;
@@ -391,11 +393,13 @@ VMWAREParseTopologyString(ScrnInfoPtr pScrn,
extents[numOutputs - 1].height = height;
} while (*str != 0);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing static Xinerama topology: Succeeded.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing %s topology: Succeeded.\n",
+ info);
goto exit;
error:
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing static Xinerama topology: Failed.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Parsing %s topology: Failed.\n",
+ info);
free(extents);
extents = NULL;
@@ -1435,11 +1439,25 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
- if (useXinerama && xf86IsOptionSet(options, OPTION_STATIC_XINERAMA)) {
+ if (useXinerama && xf86IsOptionSet(options, OPTION_GUI_LAYOUT)) {
+ char *topology = xf86GetOptValString(options, OPTION_GUI_LAYOUT);
+ if (topology) {
+ pVMWARE->xineramaState =
+ VMWAREParseTopologyString(pScrn, topology,
+ &pVMWARE->xineramaNumOutputs, "gui");
+
+ pVMWARE->xineramaStatic = pVMWARE->xineramaState != NULL;
+
+ free(topology);
+ }
+ } else if (useXinerama &&
+ xf86IsOptionSet(options, OPTION_STATIC_XINERAMA)) {
char *topology = xf86GetOptValString(options, OPTION_STATIC_XINERAMA);
if (topology) {
pVMWARE->xineramaState =
- VMWAREParseTopologyString(pScrn, topology, &pVMWARE->xineramaNumOutputs);
+ VMWAREParseTopologyString(pScrn, topology,
+ &pVMWARE->xineramaNumOutputs,
+ "static Xinerama");
pVMWARE->xineramaStatic = pVMWARE->xineramaState != NULL;