diff options
author | Philip Langdale <philipl@fido2.homeip.net> | 2006-09-03 10:45:22 -0700 |
---|---|---|
committer | Philip Langdale <philipl@fido2.homeip.net> | 2006-09-03 10:45:22 -0700 |
commit | 0850feff708ded63c27dc938ca4b9b8fcbed122b (patch) | |
tree | cb675eb5429bc9878b4fc211bb41524140ce2056 /src/vmwarectrl.c | |
parent | 86aeab28b806642946e59a98573c5b25840c35ed (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/vmwarectrl.c')
-rw-r--r-- | src/vmwarectrl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vmwarectrl.c b/src/vmwarectrl.c index 49ccccd..7d3e564 100644 --- a/src/vmwarectrl.c +++ b/src/vmwarectrl.c @@ -134,6 +134,13 @@ VMwareCtrlDoSetRes(ScrnInfoPtr pScrn, mode = pVMWARE->dynMode1; pVMWARE->dynMode1 = pVMWARE->dynMode2; pVMWARE->dynMode2 = mode; + + /* + * Initialise the dynamic mode if it hasn't been used before. + */ + if (!pVMWARE->dynMode1) { + pVMWARE->dynMode1 = VMWAREAddDisplayMode(pScrn, "DynMode", 1, 1); + } mode = pVMWARE->dynMode1; mode->HDisplay = x; |