From 970cedf972c573d76219529bdd6d60f20a35b072 Mon Sep 17 00:00:00 2001 From: Joan Bruguera Date: Sun, 11 Mar 2018 19:03:39 +0100 Subject: [PATCH] Add again wrongly removed conditional macro for Mac. Add again the wrongly removed conditional macro for Mac, along with a TODO asking for further documentation on its significance. --- src/gui/MainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index f773e15b8..395189d15 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -971,10 +971,11 @@ void MainWindow::trayIconTriggered(QSystemTrayIcon::ActivationReason reason) void MainWindow::hideWindow() { saveWindowInformation(); -#ifndef Q_OS_LINUX +#if !defined(Q_OS_LINUX) && !defined(Q_OS_MAC) // On some Linux systems, the window should NOT be minimized and hidden (i.e. not shown), at // the same time (which would happen if both minimize on startup and minimize to tray are set) // since otherwise it causes problems on restore as seen on issue #1595. Hiding it is enough. + // TODO: Add an explanation for why this is also not done on Mac (or remove the check) setWindowState(windowState() | Qt::WindowMinimized); #endif QTimer::singleShot(0, this, SLOT(hide()));