On Thu, 2015-06-18 at 15:15 -0500, Jonathon Jongsma wrote: > When starting remote-viewer with the --reconnect switch to a guest that Just change the remote-viewer to virt-viewer > has a spice password, if the user cancels the authentication dialog And you can remove the 'spice' > (e.g. pressing 'Esc'), the window will display "Waiting for guest domain > to restart". Obviously, the domain will never restart because it's > already running. > > After this fix, the application will simply exit when the user cancels > authentication, even if the --reconnect switch is used. Ack Pavel > --- > src/virt-viewer-app.c | 5 +++++ > src/virt-viewer-app.h | 1 + > src/virt-viewer.c | 2 +- > 3 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c > index daa225e..3862ec2 100644 > --- a/src/virt-viewer-app.c > +++ b/src/virt-viewer-app.c > @@ -2566,6 +2566,11 @@ virt_viewer_app_get_option_group(void) > return group; > } > > +gboolean virt_viewer_app_get_session_cancelled(VirtViewerApp *self) > +{ > + return self->priv->cancelled; > +} > + > /* > * Local variables: > * c-indent-level: 4 > diff --git a/src/virt-viewer-app.h b/src/virt-viewer-app.h > index f53fa73..bbbc9b4 100644 > --- a/src/virt-viewer-app.h > +++ b/src/virt-viewer-app.h > @@ -102,6 +102,7 @@ gint > virt_viewer_app_get_initial_monitor_for_display(VirtViewerApp* self, gint d > void virt_viewer_app_set_enable_accel(VirtViewerApp *app, gboolean enable); > void virt_viewer_app_show_preferences(VirtViewerApp *app, GtkWidget *parent); > void virt_viewer_app_set_menus_sensitive(VirtViewerApp *self, gboolean > sensitive); > +gboolean virt_viewer_app_get_session_cancelled(VirtViewerApp *self); > > G_END_DECLS > > diff --git a/src/virt-viewer.c b/src/virt-viewer.c > index 9c3ccc9..637b9e4 100644 > --- a/src/virt-viewer.c > +++ b/src/virt-viewer.c > @@ -161,7 +161,7 @@ virt_viewer_deactivated(VirtViewerApp *app, gboolean > connect_error) > priv->dom = NULL; > } > > - if (priv->reconnect) { > + if (priv->reconnect && !virt_viewer_app_get_session_cancelled(app)) { > if (priv->domain_event < 0) { > g_debug("No domain events, falling back to polling"); > virt_viewer_start_reconnect_poll(self); _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list