1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-24 21:44:25 +00:00

Merge pull request #10590 from onlined/fix/close-system-tray-blank-screen

Don't turn screen blank when closed to system tray
This commit is contained in:
Mike Tzou 2019-05-11 12:24:43 +08:00 committed by GitHub
commit ca0dad7356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1142,8 +1142,8 @@ void MainWindow::closeEvent(QCloseEvent *e)
#else
const bool goToSystrayOnExit = pref->closeToTray();
if (!m_forceExit && m_systrayIcon && goToSystrayOnExit && !this->isHidden()) {
hide();
e->accept();
e->ignore();
QTimer::singleShot(0, this, &QWidget::hide);
if (!pref->closeToTrayNotified()) {
showNotificationBaloon(tr("qBittorrent is closed to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
pref->setCloseToTrayNotified(true);