[virt-tools-list] [PATCH virt-viewer] Set initial window size to display desktop size

Jonathon Jongsma jjongsma at redhat.com
Wed Sep 3 14:39:44 UTC 2014


When setting the 'display' for a VirtViewerWindow, the initial size for
that window should be the size of the remote display. So we synthesize a
desktop resize event when setting a new display for a window.  This is
only done for enabled displays. Disabled displays generally have a size
of 0x0, which would result in the window being at it's minimum size, so
just allow the window to use its default size.
---

NOTE: This should fix the regression reported by Fabiano


 src/virt-viewer-window.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 82c4fa6..fa04a97 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1319,6 +1319,8 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
                                           G_CALLBACK(virt_viewer_window_desktop_resize), self, 0);
         virt_viewer_signal_connect_object(display, "notify::show-hint",
                                           G_CALLBACK(display_show_hint), self, 0);
+        if (virt_viewer_display_get_enabled(display))
+            virt_viewer_window_desktop_resize(display, self);
     }
 }
 
-- 
1.9.3




More information about the virt-tools-list mailing list