Show exit confirmation if connection is active

This commit is contained in:
Patrick Nicolas
2026-02-02 10:51:56 +01:00
parent d5e4e3cfce
commit ef21074d29
+2 -2
View File
@@ -37,7 +37,7 @@ Kirigami.ApplicationWindow {
}
onClosing: (close) => {
if (WivrnServer.ownServer)
if (WivrnServer.ownServer && WivrnServer.sessionRunning)
{
close.accepted = false;
confirm_close.open();
@@ -49,7 +49,7 @@ Kirigami.ApplicationWindow {
Kirigami.PromptDialog {
id: confirm_close
title: i18n("Quit WiVRn")
subtitle: i18n("The WiVRn server is still running.\nClosing the window will terminate it.")
subtitle: i18n("The WiVRn server is active.\nClosing the window will terminate it.")
iconName: "dialog-warning"
popupType: Controls.Popup.Native
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel