[virt-tools-list] [PATCH virt-viewer 1/2] session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crash

Pavel Grunt pgrunt at redhat.com
Mon Apr 20 12:40:13 UTC 2015


The VNC display widget of gtk-vnc v0.3.8 needs a window at the moment
it is initialized otherwise it would crash.

Resolves: rhbz#1196517
---
 src/virt-viewer-session-vnc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-session-vnc.c
index 5a2dd86..e6189c5 100644
--- a/src/virt-viewer-session-vnc.c
+++ b/src/virt-viewer-session-vnc.c
@@ -99,6 +99,11 @@ virt_viewer_session_vnc_connected(VncDisplay *vnc G_GNUC_UNUSED,
                                   VirtViewerSessionVnc *session)
 {
     GtkWidget *display = virt_viewer_display_vnc_new(session, session->priv->vnc);
+    VirtViewerApp *app = virt_viewer_session_get_app(VIRT_VIEWER_SESSION(session));
+
+    virt_viewer_window_set_display(virt_viewer_app_get_main_window(app),
+                                   VIRT_VIEWER_DISPLAY(display));
+
     g_signal_emit_by_name(session, "session-connected");
     virt_viewer_session_add_display(VIRT_VIEWER_SESSION(session),
                                     VIRT_VIEWER_DISPLAY(display));
-- 
2.3.5




More information about the virt-tools-list mailing list