[virt-tools-list] [PATCH virt-viewer] Enable the display before showing the window

Jonathon Jongsma jjongsma at redhat.com
Fri Dec 13 16:17:09 UTC 2013


This ensures that the display is enabled when it gets its first Allocate event
(which causes a display reconfiguration).  If the display is not enabled at this
point, it won't send down a new monitors_config message until the second
allocation, which may result in the display being disabled until a window is
resized.
---
 src/virt-viewer-window.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index af4d0bc..05d5fe7 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1299,11 +1299,11 @@ virt_viewer_window_enable_kiosk(VirtViewerWindow *self)
 void
 virt_viewer_window_show(VirtViewerWindow *self)
 {
-    gtk_widget_show(self->priv->window);
-
     if (self->priv->display)
         virt_viewer_display_set_enabled(self->priv->display, TRUE);
 
+    gtk_widget_show(self->priv->window);
+
     if (self->priv->desktop_resize_pending) {
         virt_viewer_window_resize(self, FALSE);
         self->priv->desktop_resize_pending = FALSE;
-- 
1.8.3.1




More information about the virt-tools-list mailing list