Fix toggle window from tray can't hide the window on Windows (#1595)

Fix unreliable check on toggleWindow() which causes Windows systems to be unable to hide the window by clicking on the tray icon (see issue #1595).
This commit is contained in:
Joan Bruguera 2018-03-11 14:04:33 +01:00 committed by TheZ3ro
parent 319c8201be
commit 467867016d

View file

@ -980,7 +980,7 @@ void MainWindow::hideWindow()
void MainWindow::toggleWindow() void MainWindow::toggleWindow()
{ {
if ((QApplication::activeWindow() == this) && isVisible() && !isMinimized()) { if (isVisible() && !isMinimized()) {
hideWindow(); hideWindow();
} else { } else {
bringToFront(); bringToFront();