summaryrefslogtreecommitdiffhomepage
path: root/gui/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-09 15:30:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-10 10:41:55 +0200
commit3c807347241130162cd809a726ef8a3b1e0e4068 (patch)
tree341fe91fcee1e3b71890814d6af3fc9c9ded73ec /gui/main.cpp
parent8d63d703808caad01159638d50fcca8ead63bc51 (diff)
gui: fix tray icon regression
Issue: #410 Reported-by: @albertolg
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index 3220f31d..f8d27da7 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -130,9 +130,15 @@ int main(int argc, char** argv)
MainWindow::set_working_directory();
- auto w = std::make_shared<MainWindow>();
+ mem<MainWindow> w = std::make_shared<MainWindow>();
- w->show();
+ if (!w->is_tray_enabled())
+ w->show();
+ else
+ {
+ w->setVisible(false);
+ w->setHidden(true);
+ }
app.exec();
// on MSVC crashes in atexit