Cope with focusWidget/activeWindow returning windows that are minimized.

This commit is contained in:
Felix Geyer 2015-10-10 11:22:17 +02:00
parent ebeedba072
commit 840642394f
2 changed files with 3 additions and 2 deletions

View file

@ -575,10 +575,11 @@ void MainWindow::trayIconTriggered(QSystemTrayIcon::ActivationReason reason)
void MainWindow::toggleWindow()
{
if (QApplication::activeWindow() == this) {
if ((QApplication::activeWindow() == this) && isVisible() && !isMinimized()) {
hide();
}
else {
ensurePolished();
setWindowState(windowState() & ~Qt::WindowMinimized);
show();
raise();