The SpiceDisplay doesn't receive the full allocation, because
VirtViewerDisplay maintains current aspect ratio. However, the guest
display can be resize up to its container size.

This fixes going full-screen and not getting native resolution for
instance.
---
 src/virt-viewer-display-spice.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index f27cbf7..570cdd5 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -152,9 +152,9 @@ virt_viewer_display_spice_mouse_grab(SpiceDisplay *display 
G_GNUC_UNUSED,
 
 
 static void
-virt_viewer_display_spice_size_allocate(SpiceDisplay *display G_GNUC_UNUSED,
+virt_viewer_display_spice_size_allocate(VirtViewerDisplaySpice *self,
                                         GtkAllocation *allocation,
-                                        VirtViewerDisplaySpice *self 
G_GNUC_UNUSED)
+                                        gpointer data G_GNUC_UNUSED)
 {
     gdouble dw = allocation->width, dh = allocation->height;
     guint zoom = 100;
@@ -217,7 +217,7 @@ virt_viewer_display_spice_new(VirtViewerSessionSpice 
*session,
     g_signal_connect(self->priv->display,
                      "mouse-grab",
                      G_CALLBACK(virt_viewer_display_spice_mouse_grab), self);
-    g_signal_connect(self->priv->display,
+    g_signal_connect(self,
                      "size-allocate",
                      G_CALLBACK(virt_viewer_display_spice_size_allocate), 
self);
 
-- 
1.7.7.6

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to