[virt-tools-list] [PATCH 5 of 5] viewer: add support for spice resize-guest

Daniel P. Berrange berrange at redhat.com
Tue Dec 14 15:52:03 UTC 2010


On Fri, Dec 10, 2010 at 12:58:23PM +0100, Marc-André Lureau wrote:
> Hi!
> 
> On Thu, Dec 9, 2010 at 12:20 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> > Could you explain a little more why SPICE doesn't want to be
> > inside an alignment widget. In VNC we use that to ensure that
> > you get either vertical or horizontal black bars if the window
> > is resized to a non-guest native aspect ratio. How does spice
> > deal with resizing & scaling & aspect ratios ?
> 
> spice-gtk doesn't need alignment widget. It already draws black
> borders. Gerd originally wrote the code this way. I don't know why,
> but it works. If we have enough reason to change this behaviour, I am
> ok dropping that code.

Ok, technically GTK-VNC does paint black borders when
scaling mode is disabled, because the aspect ratio is
fixed. virt-viewer always enables scaling mode in GTK-VNC
though, and then uses the alignment widget to deal with
the aspect ratio handling. ie, virt-viewer will default
to preseving the aspect ratio, but the user can always
manually resize to the window at will without getting
black bars.

> Regarding resizing, spice will resize the guest desktop to fit in the
> the client window.
> 
> I discussed with the team about adding scaling functionality as well,
> to match with gtk-vnc behavior, but they all seemed to tell me it was
> non-sense, since it can just resize the desktop instead. I still find
> that scaling could be useful in some 'weird' cases, but I don't think
> we can combine both behaviors. Thus, I prefer to keep guest desktop
> resizing.

Just repeating what we discussed on IRC for mail logs...

The guest display auto-resize functionality relies on SPICE
connecting to a QEMU with a QXL graphics card, and a guest
agent installed. If either of those are not true the host
or client cannot directly control guest display size, ie
SPICE gets the same limitation as you have with VNC. Conversely
you can write an agent that handles guest resize for VNC guests
too, avoiding the need for client side scaling. So in summary
guest resize and client scaling are complementary features
for different scenarios, and thus aren't mutually exclusive.

Regards,
Daniel




More information about the virt-tools-list mailing list