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

Pavel Grunt pgrunt at redhat.com
Wed Mar 29 10:36:58 UTC 2017


It will enable some functionality, like zoom.

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




More information about the virt-tools-list mailing list