1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-30 17:14:58 +01:00

MainWindow: Only hide window when system tray and keep running is enabled

This commit is contained in:
Jonas Kvinge 2025-01-22 17:26:08 +01:00
parent 159be5d79e
commit 719fa6ffb3

View File

@ -1695,7 +1695,12 @@ void MainWindow::closeEvent(QCloseEvent *e) {
void MainWindow::SetHiddenInTray(const bool hidden) {
if (hidden && isVisible()) {
hide();
if (tray_icon_->IsSystemTrayAvailable() && tray_icon_->isVisible() && keep_running_) {
close();
}
else {
showMinimized();
}
}
else if (!hidden && isHidden()) {
if (was_minimized_) {