summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2007-02-08 18:07:19 -0800
committerPhilip Langdale <philipl@fido2.homeip.net>2007-02-08 18:07:19 -0800
commit2ec8c25cc935a318bd07c0d1fba9960dfe8f38d4 (patch)
tree37127ff11360d39c57de7b804e5c4913fec20a72 /src
parenta8afe781e108773e4a575ecc3330a5aa83c1cbb9 (diff)
Fix a race condition when switching to a multihead fullscreen mode.
Due to implemtation details on the host side, switching to a multihead fullscreen mode means multiple mode changes along the way. However, because rrSetScreenConfig returns before the mode change completes, we can enter a race, where a subsequent SetDisplayTopology overrides the current pending one, leading to a mode switch where the resolution and topology are no longer consistent. So, we fix this by ignoring any attempts to set the pending topology if one is already pending.
Diffstat (limited to 'src')
-rw-r--r--src/vmwarectrl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vmwarectrl.c b/src/vmwarectrl.c
index f2c831d..dc9e91f 100644
--- a/src/vmwarectrl.c
+++ b/src/vmwarectrl.c
@@ -229,7 +229,8 @@ VMwareCtrlSetRes(ClientPtr client)
* VMwareCtrlDoSetTopology --
*
* Set the custom topology and set a dynamic mode to the bounding box
- * of the passed topology.
+ * of the passed topology. If a topology is already pending, then do
+ * nothing but do not return failure.
*
* Results:
* TRUE on success, FALSE otherwise.
@@ -254,6 +255,11 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
short maxY = 0;
size_t i;
+ if (pVMWARE->xineramaNextState) {
+ VmwareLog(("DoSetTopology: Aborting due to existing pending state\n"));
+ return TRUE;
+ }
+
for (i = 0; i < number; i++) {
maxX = MAX(maxX, extents[i].x_org + extents[i].width);
maxY = MAX(maxY, extents[i].y_org + extents[i].height);