mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-31 20:04:01 +00:00
src: remove SIGINT handler after first firing
If you press Ctrl-C while the auth dialog is active it gets ignored because calling g_application_quit() won't break out of the model g_dialog_run() call. By removing the SIGINT handler after first firing, we can at least let the user press Ctrl-C a second time to force quit. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5b44064b35
commit
c6f429627c
@ -308,10 +308,10 @@ virt_viewer_app_quit(VirtViewerApp *self)
|
||||
VIRT_VIEWER_SESSION_VM_ACTION_QUIT);
|
||||
}
|
||||
|
||||
priv->quitting = TRUE;
|
||||
if (priv->session) {
|
||||
virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
|
||||
if (priv->connected) {
|
||||
priv->quitting = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2125,7 +2125,7 @@ sigint_cb(gpointer data)
|
||||
else
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
return priv->quitting ? G_SOURCE_REMOVE : G_SOURCE_CONTINUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user