mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07: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:
commit
ca0dad7356
1 changed files with 2 additions and 2 deletions
|
@ -1142,8 +1142,8 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
||||||
#else
|
#else
|
||||||
const bool goToSystrayOnExit = pref->closeToTray();
|
const bool goToSystrayOnExit = pref->closeToTray();
|
||||||
if (!m_forceExit && m_systrayIcon && goToSystrayOnExit && !this->isHidden()) {
|
if (!m_forceExit && m_systrayIcon && goToSystrayOnExit && !this->isHidden()) {
|
||||||
hide();
|
e->ignore();
|
||||||
e->accept();
|
QTimer::singleShot(0, this, &QWidget::hide);
|
||||||
if (!pref->closeToTrayNotified()) {
|
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."));
|
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);
|
pref->setCloseToTrayNotified(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue