[virt-tools-list] [PATCH virt-viewer] vnc: Set display as enabled on init

Pavel Grunt pgrunt at redhat.com
Tue Apr 4 11:55:22 UTC 2017


On Wed, 2017-03-29 at 14:39 -0300, Eduardo Lima (Etrunko) wrote:
> On 29/03/17 07:36, Pavel Grunt wrote:
> > It will enable some functionality, like zoom.
> > 
> 
> You could maybe elaborate a bit better, as you are also setting
> enabled
> to FALSE it when the session gets disconnected.

ok, let's change it to:

Since 9c77a78af2ef85f3fcdce21b42d89566a9f7ee17 the vnc display has
stopped setting the show hint and started to ignore the initial zoom
setting. Let's handle it in a similar way as the spice display and set
the hint when the display is initialized and unset it on disconnect.

> 
> Acked-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> 
> > Regression since 9c77a78af2ef85f3fcdce21b42d89566a9f7ee17
> > 
> > Resolves: rhbz#1436991
> > ---
> >  src/virt-viewer-display-vnc.c | 1 +
> >  src/virt-viewer-session-vnc.c | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/src/virt-viewer-display-vnc.c b/src/virt-viewer-
> > display-vnc.c
> > index cb45c23..c200ac2 100644
> > --- a/src/virt-viewer-display-vnc.c
> > +++ b/src/virt-viewer-display-vnc.c
> > @@ -134,6 +134,7 @@ virt_viewer_display_vnc_initialized(VncDisplay
> > *vnc G_GNUC_UNUSED,
> >          g_object_set(app, "uuid", _("VNC does not provide GUID"),
> > NULL);
> >      }
> >  
> > +    virt_viewer_display_set_enabled(display, TRUE);
> >      virt_viewer_display_set_show_hint(display,
> >                                        VIRT_VIEWER_DISPLAY_SHOW_HI
> > NT_READY, TRUE);
> >  
> > diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-
> > session-vnc.c
> > index 231f22f..26fb405 100644
> > --- a/src/virt-viewer-session-vnc.c
> > +++ b/src/virt-viewer-session-vnc.c
> > @@ -122,6 +122,7 @@
> > virt_viewer_session_vnc_disconnected(VncDisplay *vnc
> > G_GNUC_UNUSED,
> >      display = virt_viewer_display_vnc_new(session, session->priv-
> > >vnc);
> >      g_debug("Disconnected");
> >      g_signal_emit_by_name(session, "session-disconnected", NULL);
> > +    virt_viewer_display_set_enabled(VIRT_VIEWER_DISPLAY(display),
> > FALSE);
> >      virt_viewer_display_set_show_hint(VIRT_VIEWER_DISPLAY(display
> > ),
> >                                        VIRT_VIEWER_DISPLAY_SHOW_HI
> > NT_READY, FALSE);
> >  }
> > 
> 
> 
> 
> 




More information about the virt-tools-list mailing list