[virt-tools-list] [PATCH virt-viewer 3/3] virt-viewer-window: Check for maximum zoom level
Jonathon Jongsma
jjongsma at redhat.com
Tue May 19 16:12:33 UTC 2015
On Tue, 2015-05-19 at 09:56 +0200, Pavel Grunt wrote:
> Hi Jonathon,
>
> On Mon, 2015-05-18 at 17:09 -0500, Jonathon Jongsma wrote:
> > Hi Pavel,
> >
> > To me, it feels a little bit like we're solving the wrong problem
> > here.
> > I spent a little bit of time testing the bug listed below, and here
> > are
> > my observations:
> >
> > - When we use e.g. --zoom=200 at startup, virt-viewer tries to make
> > the
> > window 2x as big as the guest resolution.
> > - if this window size would be greater than the size of the client
> > monitor, gnome-shell will prevent the window from getting that large
> > and
> > will limit it to the size of the client monitor.
> > - From here, the behavior between vnc and spice-gtk (with vdagent)
> > differs:
> >
> > spice-gtk:
> > - the window is displayed at the requested zoom level, but the guest
> > resolution is resized smaller to fit within the client monitor
>
>
> Thats true for gnome-shell, but not for GNOME in RHEL6
OK, I admit that I didn't test a wide range of different setups. My
understanding from your comments was that GNOME in RHEL6 allows the
window to exceed the client desktop, so there's no bug at all, right?
>
> > (taking
> > into account the zoom factor)
> > - clicking "view > zoom > normal size" will shrink the display to
> > this
> > smaller size and show it at 100% scale.
> > - This doesn't really seem like a bug to me
> >
> > VNC:
> > - Since the client cannot resize the resolution of a guest in VNC,
> > resizing a window is the same as zooming it. If gnome-shell limits
> > the
> > window to smaller than requested, it is effectively reducing the zoom
> > level. But the application seems to think its zoom level is still
> > 200%.
> > - clicking "view > zoom > normal size" shrinks the display and
> > scales it
> > to a value less than 100% because it unscales the display by 200%
> > (even
> > though its actual zoom level is really only e.g. 150%).
> > - In theory this all applies to spice-gtk without a vdagent as well.
> >
> > So I think that this bug could be fixed by unscaling the display by
> > the
> > actual effective zoom level (150% in the example above) instead of
> > the
> > zoom level given on the command line (200%). That seems simpler than
> > adding new accessors and calculating maximum zoom levels, etc.
> >
> > What do you think?
>
> Well, I don't think that zooming in should resize the guest (this is
> happening in gnome-shell and in Windows), also I don't think that the
> window should grow to exceed the monitor size (this is happening in
> GNOME, Xfce).
>
> I will go the way you suggested (unscaling the display), but I would
> like to discuss whether 'resizing of guest' should happen.
Yes, that's a good discussion to have. I don't know the answer to that
since I don't completely understand the purpose of starting the client
with a --zoom value specified. Anybody else?
Jonathon
More information about the virt-tools-list
mailing list