mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 20:36:44 +01:00
Fix blank window when restoring from systray (#6351)
* Fix blank window when restoring from systray This applies the fix qBittorrent used for this same issue: https://github.com/qbittorrent/qBittorrent/issues/9240, so credit goes to those guys * Fix whitespace
This commit is contained in:
parent
9af827b6ac
commit
c9800a4dc9
@ -1441,7 +1441,7 @@ void MainWindow::closeEvent(QCloseEvent* event) {
|
||||
keep_running = s.value("keeprunning", tray_icon_->IsVisible()).toBool();
|
||||
|
||||
if (keep_running && event->spontaneous()) {
|
||||
event->accept();
|
||||
event->ignore();
|
||||
SetHiddenInTray(true);
|
||||
} else {
|
||||
Exit();
|
||||
@ -1454,7 +1454,7 @@ void MainWindow::SetHiddenInTray(bool hidden) {
|
||||
// Some window managers don't remember maximized state between calls to
|
||||
// hide() and show(), so we have to remember it ourself.
|
||||
if (hidden) {
|
||||
hide();
|
||||
QTimer::singleShot(0, this, &QWidget::hide);
|
||||
} else {
|
||||
if (was_maximized_)
|
||||
showMaximized();
|
||||
|
Loading…
x
Reference in New Issue
Block a user