Blame SOURCES/0029-vnc-Set-display-as-enabled-on-init.patch

140d58
From eb99fca90471cdedf2799be1cd98960e75c51ac0 Mon Sep 17 00:00:00 2001
140d58
From: Pavel Grunt <pgrunt@redhat.com>
140d58
Date: Wed, 29 Mar 2017 12:36:58 +0200
140d58
Subject: [PATCH virt-viewer 29/32] vnc: Set display as enabled on init
140d58
To: virt-tools-list@redhat.com
140d58
140d58
Since 9c77a78af2ef85f3fcdce21b42d89566a9f7ee17 the vnc display has
140d58
stopped setting the show hint and started to ignore the initial zoom
140d58
setting. Let's handle it in a similar way as the spice display and set
140d58
the hint when the display is initialized and unset it on disconnect.
140d58
140d58
Resolves: rhbz#1436991
140d58
140d58
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
140d58
(cherry picked from commit 47c7f4c064d6fe782717b4cb692447f52434c879)
140d58
---
140d58
 src/virt-viewer-display-vnc.c | 1 +
140d58
 src/virt-viewer-session-vnc.c | 1 +
140d58
 2 files changed, 2 insertions(+)
140d58
140d58
diff --git a/src/virt-viewer-display-vnc.c b/src/virt-viewer-display-vnc.c
140d58
index cb45c23..c200ac2 100644
140d58
--- a/src/virt-viewer-display-vnc.c
140d58
+++ b/src/virt-viewer-display-vnc.c
140d58
@@ -134,6 +134,7 @@ virt_viewer_display_vnc_initialized(VncDisplay *vnc G_GNUC_UNUSED,
140d58
         g_object_set(app, "uuid", _("VNC does not provide GUID"), NULL);
140d58
     }
140d58
 
140d58
+    virt_viewer_display_set_enabled(display, TRUE);
140d58
     virt_viewer_display_set_show_hint(display,
140d58
                                       VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, TRUE);
140d58
 
140d58
diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-session-vnc.c
140d58
index 231f22f..26fb405 100644
140d58
--- a/src/virt-viewer-session-vnc.c
140d58
+++ b/src/virt-viewer-session-vnc.c
140d58
@@ -122,6 +122,7 @@ virt_viewer_session_vnc_disconnected(VncDisplay *vnc G_GNUC_UNUSED,
140d58
     display = virt_viewer_display_vnc_new(session, session->priv->vnc);
140d58
     g_debug("Disconnected");
140d58
     g_signal_emit_by_name(session, "session-disconnected", NULL);
140d58
+    virt_viewer_display_set_enabled(VIRT_VIEWER_DISPLAY(display), FALSE);
140d58
     virt_viewer_display_set_show_hint(VIRT_VIEWER_DISPLAY(display),
140d58
                                       VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, FALSE);
140d58
 }
140d58
-- 
140d58
2.12.2
140d58