vnc: Set display as enabled on init

Since 9c77a78af2 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.

Resolves: rhbz#1436991

Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Pavel Grunt 2017-03-29 12:36:58 +02:00
parent 4d08da9672
commit 47c7f4c064
2 changed files with 2 additions and 0 deletions

View File

@ -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_HINT_READY, TRUE);

View File

@ -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_HINT_READY, FALSE);
}