Bug 546453 - The virt-manager 0.8.1's new "resize to VM" does not work well
Summary: The virt-manager 0.8.1's new "resize to VM" does not work well
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F13VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-12-10 22:16 UTC by Howard Ning
Modified: 2009-12-15 02:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-15 02:56:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
This is the screenshot after I run "resize to VM" (356.74 KB, image/png)
2009-12-10 22:16 UTC, Howard Ning
no flags Details

Description Howard Ning 2009-12-10 22:16:50 UTC
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):
0.8.1-2

How reproducible:
Run a guest, try reisize to VM.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
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.

Expected results:


Additional info:

Comment 1 Justin M. Forbes 2009-12-11 17:44:05 UTC
Thanks for the report. Any ideas Cole?

Comment 2 Cole Robinson 2009-12-11 17:55:08 UTC
Not sure, I'll try to reproduce.

Comment 3 Howard Ning 2009-12-11 19:55:09 UTC
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.

Comment 4 Daniel Berrangé 2009-12-11 20:17:26 UTC
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.

Comment 5 Cole Robinson 2009-12-11 21:03:38 UTC
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).

Comment 6 Howard Ning 2009-12-11 21:36:28 UTC
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.

Comment 7 Cole Robinson 2009-12-15 01:52:34 UTC
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.

Comment 8 Howard Ning 2009-12-15 02:56:22 UTC
I have tested the latest 0.8.2 version, it is working now. I will close this bug.


Note You need to log in before you can comment on or make changes to this bug.