[virt-tools-list] [PATCH virt-viewer 1/2] session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crash
Jonathon Jongsma
jjongsma at redhat.com
Mon Apr 20 17:26:21 UTC 2015
On Mon, 2015-04-20 at 14:40 +0200, Pavel Grunt wrote:
> 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));
I reviewed this informally already and I think it's a better approach,
but I'd be interested in whether Christophe has any comments since I
think he was involved in the original patch.
Jonathon
More information about the virt-tools-list
mailing list