From 1b08e21691bf2e7547054da3dcef54e6c57a3496 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 17 Nov 2021 15:27:19 -0500 Subject: [PATCH] fix(app): fix minimising the app on close for Windows and Linux Fixes #4128 --- ui/main.qml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/main.qml b/ui/main.qml index b9ee78a4c9..a9eaa0b2ef 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -96,8 +96,21 @@ StatusWindow { Connections { target: applicationWindow onClosing: { - loader.sourceComponent = undefined - close.accepted = true + if (Qt.platform.os === "osx") { + loader.sourceComponent = undefined + close.accepted = true + } else { + if (loader.sourceComponent == login) { + Qt.quit(); + } + else if (loader.sourceComponent == app) { + if (localAccountSensitiveSettings.quitOnClose) { + Qt.quit(); + } else { + applicationWindow.visible = false; + } + } + } } onActiveChanged: {