[virt-tools-list] [PATCH virt-viewer 12/17] Resize guest desktop with SPICE

Daniel P. Berrange berrange at redhat.com
Tue Jan 31 14:18:18 UTC 2012


On Fri, Jan 27, 2012 at 02:51:31PM +0100, Marc-André Lureau wrote:
> This is the method we prefer, even though we can't keep aspect ratio.
> We could eventually support aspect ration in spice-gtk.
> ---
>  src/virt-viewer-display-spice.c |    5 ++++-
>  src/virt-viewer-display.c       |   21 +++++++++++++++++++--
>  src/virt-viewer-display.h       |    2 ++
>  3 files changed, 25 insertions(+), 3 deletions(-)
> 
> diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
> index c73692d..2ae40dd 100644
> --- a/src/virt-viewer-display-spice.c
> +++ b/src/virt-viewer-display-spice.c
> @@ -73,6 +73,8 @@ static void
>  virt_viewer_display_spice_init(VirtViewerDisplaySpice *self G_GNUC_UNUSED)
>  {
>  	self->priv = VIRT_VIEWER_DISPLAY_SPICE_GET_PRIVATE(self);
> +
> +	virt_viewer_display_set_maintain_aspect_ratio(VIRT_VIEWER_DISPLAY(self), FALSE);
>  }
>  
>  static void
> @@ -122,6 +124,7 @@ primary_create(SpiceChannel *channel G_GNUC_UNUSED,
>  	DEBUG_LOG("spice desktop resize %dx%d", width, height);
>  
>  	virt_viewer_display_set_desktop_size(display, width, height);
> +	virt_viewer_display_set_zoom_level(display, 100);

This prevents the zoom in/out functionality from working, so I removed
that.

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 :|




More information about the virt-tools-list mailing list