Red Hat Bugzilla – Bug 546453
The virt-manager 0.8.1's new "resize to VM" does not work well
Last modified: 2009-12-14 21:56:49 EST
Created attachment 377605 [details]
This is the screenshot after I run "resize to VM"
Description of problem:
When you start a guest, if your current host window size is smaller than the guest(The scroll bar will appear), the "resize to VM" will not fully resize the VM screen in host(The scroll bar still appears). But if you drag the window size larger than guest's window size (black edge will appear) and run "resize to VM", it will resize to the correct size.
Version-Release number of selected component (if applicable):
Run a guest, try reisize to VM.
Steps to Reproduce:
Do not resize correctly when the host window is smaller than guest window. But it works fine if the guest window is smaller than host's.
Thanks for the report. Any ideas Cole?
Not sure, I'll try to reproduce.
I can reproduce it everytime in a fresh install of Fedora 12 x86-64 with updates and only virt-manager from koji. The guest can be ubuntu i386, windows xp or fedora 12 i386.
GTK autosizing scrollbars is notoriously unreliable in my experiance. It will very often display scrollbars, even if the (widget size - scrollbar size) is large enough to fit the content. I've spent days probing the scrollbar code and its such a crazy hack, I'm surprised it works at all. For virt-viewer, I ended up killing scrollbars completely and having scaling mode active at all times. It defaults to showing the display at native size, unless the guest is larger than the host, in which case it scales down. Certainly if you have scaling turned on, then you should forceably disable the scrollbars to ensure they don't mistakenly appear.
When scaling is enabled, the scroll bars are disabled. But I tried to avoid mandatory scaling and match the semantics of vinagre (which defaults to scaling=off, and uses scroll bars when required otherwise). When I was testing the 'resize to VM' option I wasn't hitting the scrollbar issue the user reports and (which was also referenced in a comment in the old code).
virt-viewer can resize the VM screen to the right size but virt-manager will "remember" the size and will not change if the VM change the resolution.
Okay, I managed to get this working upstream by temporarily disabling the scrollbars when the 'resize' option is called.
Comment #6, the 'remebering' is intentional. Presumably once the user sets a resolution and a desired window size, they won't be resizing much in the future.
I have tested the latest 0.8.2 version, it is working now. I will close this bug.