[virt-tools-list] [PATCH virt-viewer 2/2] RFC: resize: simplify and isolate fullscreen aspect logic

Marc-André Lureau mlureau at redhat.com
Wed Mar 12 11:51:21 UTC 2014



----- Original Message -----
> On Tue, Mar 11, 2014 at 04:18:59PM +0000, Daniel P. Berrange wrote:
> > On Tue, Mar 11, 2014 at 04:38:46PM +0100, Marc-André Lureau wrote:
> > > From: Marc-André Lureau <marcandre.lureau at redhat.com>
> > > 
> > > Tbh, I don't understand the purpose of this code (both spice and vnc
> > > widgets keep the aspect ration), I would welcome some comments. I am not
> > > sure why we check fullscreen display resolution in window mode either,
> > > so I moved the code in if (priv->fullscreen)
> > > 
> > > If it's possible, this code should be removed (surrouding with if 0
> > > doesn't seem to change anything here with spice or vnc). Please help me
> > > to understand that logic.
> > > ---
> > >  src/virt-viewer-window.c | 63
> > >  +++++++++++++++++++++++-------------------------
> > >  1 file changed, 30 insertions(+), 33 deletions(-)
> > 
> > When the guest resolution exceeds the host resolution we need to scale
> > to ensure we can see the full extent of the guest desktop. If I remove
> > this code, then as you say, there doesn't appear to be any functional
> > impact. When the guest resizes, the window resizes sensibly every time,
> > scaling when too large.
> > 
> > The caveat is that this only works corretly with GTK-3.0 If I build
> > virt-viewer for GTK-2.0 then the window size isn't limited by GTK
> > and exceeds the size of the desktop. So this code is basically
> > working around a limitation fo GTK-2.0
> 
> BTW, when RHEL-7.0 is finally released I suggest that we could /
> should drop support for GTK-2.0, at which point this discussion
> point becomes moot, since GTK-3.0 will already do the right thing
> itself

We would still welcome a solution for RHEL6.

> 
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list




More information about the virt-tools-list mailing list