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

Christophe Fergeau cfergeau at redhat.com
Wed Apr 22 07:19:14 UTC 2015


Hey,

On Mon, Apr 20, 2015 at 12:26:21PM -0500, Jonathon Jongsma wrote:
> 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.

Yes, this looks better than the quick and dirty patch which I did not
even consider sending upstream. ACK from me, assuming this does not
cause sizing issues when we call this early.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20150422/efe2bafa/attachment.sig>


More information about the virt-tools-list mailing list