diff --git a/src/GUI.cpp b/src/GUI.cpp index 1c045d7a2..afa8077b3 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -580,10 +580,12 @@ bool GUI::event(QEvent * e) { qDebug("minimisation"); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); if(systrayIcon && settings.value(QString::fromUtf8("Preferences/General/MinimizeToTray"), false).toBool()) { - qDebug("Minimize to Tray enabled, hiding!"); - e->accept(); - QTimer::singleShot(0, this, SLOT(hide())); - return true; + if(!qApp->activeWindow() || !qApp->activeWindow()->isModal()) { + qDebug("Minimize to Tray enabled, hiding!"); + e->accept(); + QTimer::singleShot(0, this, SLOT(hide())); + return true; + } } } }