From 6480e52f62bc7c87bbdca1aa50f7ff08b09e9845 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Fri, 2 Jun 2017 14:05:51 +0200 Subject: [PATCH] spice: do not show error on cancel/close of auth dialog Mainly an issue for kiosk mode due the fact that it'll not quit the application on cancel. That means that authentication dialog can't really be canceled and showing an input error such as "wrong password" is misleading (no password should be taken in consideration on Cancel). Related: https://bugzilla.redhat.com/show_bug.cgi?id=1446161 Signed-off-by: Victor Toso Acked-by: Pavel Grunt Acked-by: Eduardo Lima (Etrunko) --- src/virt-viewer-session-spice.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c index 5f326aa..f43ed65 100644 --- a/src/virt-viewer-session-spice.c +++ b/src/virt-viewer-session-spice.c @@ -724,6 +724,10 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel, &password); g_free(host); if (!ret) { + /* ret is false when dialog did not return GTK_RESPONSE_OK. We + * should ignore auth error dialog if user has cancelled or closed + * the dialog */ + self->priv->pass_try = 0; g_signal_emit_by_name(session, "session-cancelled"); } else { gboolean openfd;