Do not hide the window to system tray when minimising if not available

This commit is contained in:
Andrew Hayzen 2021-03-02 22:49:20 +00:00
parent 00565fa7ea
commit 35cc645637
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}