From 35cc645637b11579cf1723d1d7706b9a0ace0b17 Mon Sep 17 00:00:00 2001 From: Andrew Hayzen Date: Tue, 2 Mar 2021 22:49:20 +0000 Subject: [PATCH] Do not hide the window to system tray when minimising if not available --- src/gui/src/MainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index a3962aa8..3438c24c 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1277,7 +1277,8 @@ void MainWindow::bonjourInstallFinished() void MainWindow::windowStateChanged() { - if (windowState() == Qt::WindowMinimized && appConfig().getMinimizeToTray()) + // If we are minimising and minimise to tray is enabled and system tray is available then hide the window + if (windowState() == Qt::WindowMinimized && appConfig().getMinimizeToTray() && QSystemTrayIcon::isSystemTrayAvailable()) hide(); }