mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-30 09:05:04 +01:00
MainWindow: Only hide window when system tray and keep running is enabled
This commit is contained in:
parent
159be5d79e
commit
719fa6ffb3
@ -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_) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user