[virt-tools-list] [PATCH] virt-viewer: fix display of guest name in title for vnc
Fabiano Fidêncio
fidencio at redhat.com
Tue Jul 12 09:56:15 UTC 2016
On Tue, Jul 12, 2016 at 11:48 AM, Daniel P. Berrange
<berrange at redhat.com> wrote:
> The following commit broke the display of the guest name in
> the title for VNC displays:
>
> commit 61a1bc4dcbb056755fe96c5945f84c1312041059
> Author: Pavel Grunt <pgrunt at redhat.com>
> Date: Wed Apr 15 13:50:35 2015 +0200
>
> session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crash
>
> The VNC display widget of gtk-vnc v0.3.8 needs a window at the moment
>
> The problem is that this causes the window to be associated
> with the display before the guest name is available. Thus
> when ensure_window_for_display() runs, the window is already
> configured and so it never invokes the logic to set the title.
>
> The fix is to unconditionally update the title in the
> ensure_window_for_display() method, even if the window already
> exists.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/virt-viewer-app.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index f983db2..e8412ac 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -898,7 +898,6 @@ ensure_window_for_display(VirtViewerApp *self, VirtViewerDisplay *display)
> if (l && virt_viewer_window_get_display(VIRT_VIEWER_WINDOW(l->data)) == NULL) {
> win = VIRT_VIEWER_WINDOW(l->data);
> g_debug("Found a window without a display, reusing for display #%d", nth);
> - virt_viewer_app_set_window_subtitle(self, win, nth);
> if (self->priv->fullscreen && !self->priv->kiosk)
> app_window_try_fullscreen(self, win, nth);
> } else {
> @@ -907,6 +906,7 @@ ensure_window_for_display(VirtViewerApp *self, VirtViewerDisplay *display)
>
> virt_viewer_window_set_display(win, display);
> }
> + virt_viewer_app_set_window_subtitle(self, win, nth);
>
> return win;
> }
> --
> 2.7.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
More information about the virt-tools-list
mailing list