summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/ui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 06ff2d3c..9c6d0522 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -442,6 +442,10 @@ void MainWindow::restore_from_tray(QSystemTrayIcon::ActivationReason)
void MainWindow::changeEvent(QEvent* e)
{
if (s.tray_enabled && e->type() == QEvent::WindowStateChange && (windowState() & Qt::WindowMinimized))
+ {
+ if (!tray)
+ ensure_tray();
hide();
+ }
QMainWindow::changeEvent(e);
}