mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-27 14:54:14 +00:00
Don't show 'do you want to quit' dialog in kiosk mode
In some situation, (for example, guest without vdagent running), it's possible to pass key combinations to virt-viewer. When using alt+f4, this can cause the 'do you want to quit?' dialog to show while it's non-functional. This commit moves the check for kiosk mode to before we show this dialog.
This commit is contained in:
parent
fe167a6668
commit
eb65226a9d
@ -252,13 +252,9 @@ static void
|
||||
virt_viewer_app_quit(VirtViewerApp *self)
|
||||
{
|
||||
g_return_if_fail(VIRT_VIEWER_IS_APP(self));
|
||||
g_return_if_fail(!self->priv->kiosk);
|
||||
VirtViewerAppPrivate *priv = self->priv;
|
||||
|
||||
if (self->priv->kiosk) {
|
||||
g_warning("The app is in kiosk mode and can't quit");
|
||||
return;
|
||||
}
|
||||
|
||||
virt_viewer_app_save_config(self);
|
||||
|
||||
if (priv->session) {
|
||||
@ -367,6 +363,11 @@ virt_viewer_app_maybe_quit(VirtViewerApp *self, VirtViewerWindow *window)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (self->priv->kiosk) {
|
||||
g_warning("The app is in kiosk mode and can't quit");
|
||||
return;
|
||||
}
|
||||
|
||||
gboolean ask = g_key_file_get_boolean(self->priv->config,
|
||||
"virt-viewer", "ask-quit", &error);
|
||||
if (error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user