[virt-tools-list] [PATCH 2/2] spice: do not show error on cancel/close of auth dialog

Victor Toso victortoso at redhat.com
Fri Jun 2 10:40:36 UTC 2017


From: Victor Toso <me at victortoso.com>

Mainly an issue for kiosk mode.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1446161
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/virt-viewer-session-spice.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index a87d4cd..660f886 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -723,6 +723,12 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel,
                                                         username_required ? &user : NULL,
                                                         &password);
         g_free(host);
+
+        /* Cancel/close should not raise an auth error dialog */
+        if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_CLOSE ||
+            response == GTK_RESPONSE_DELETE_EVENT)
+            self->priv->pass_try = 0;
+
         if (response != GTK_RESPONSE_OK) {
             g_signal_emit_by_name(session, "session-cancelled");
         } else {
-- 
2.13.0




More information about the virt-tools-list mailing list