summaryrefslogtreecommitdiff
path: root/src/vmware.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2006-09-03 10:45:22 -0700
committerPhilip Langdale <philipl@fido2.homeip.net>2006-09-03 10:45:22 -0700
commit0850feff708ded63c27dc938ca4b9b8fcbed122b (patch)
treecb675eb5429bc9878b4fc211bb41524140ce2056 /src/vmware.c
parent86aeab28b806642946e59a98573c5b25840c35ed (diff)
Fix https://bugs.freedesktop.org/show_bug.cgi?id=8094
Lazily allocate the dynamic modes used for pixel precise guest resizing. They will not appear until they are neeed.
Diffstat (limited to 'src/vmware.c')
-rw-r--r--src/vmware.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vmware.c b/src/vmware.c
index 7a22468..50af954 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -1164,7 +1164,7 @@ VMWARELoadPalette(ScrnInfoPtr pScrn, int numColors, int* indices,
}
-static DisplayModeRec *
+DisplayModeRec *
VMWAREAddDisplayMode(ScrnInfoPtr pScrn,
const char *name,
int width,
@@ -1414,8 +1414,13 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* at ScreenInit time.
*/
pVMWARE->initialMode = pScrn->currentMode;
- pVMWARE->dynMode1 = VMWAREAddDisplayMode(pScrn, "DynMode1", 1, 1);
- pVMWARE->dynMode2 = VMWAREAddDisplayMode(pScrn, "DynMode2", 2, 2);
+
+ /*
+ * We will lazily add the dynamic modes as the are needed when new
+ * modes are requested through the control extension.
+ */
+ pVMWARE->dynMode1 = NULL;
+ pVMWARE->dynMode2 = NULL;
VMwareCtrl_ExtInit(pScrn);