diff options
author | Frédéric Brière <fbriere@fbriere.net> | 2019-06-30 16:48:30 -0400 |
---|---|---|
committer | Frédéric Brière <fbriere@fbriere.net> | 2019-06-30 20:45:52 -0400 |
commit | d358a52e6124b528fb0bc09eaf4d28c8215e07e7 (patch) | |
tree | d422363291d0e6b51b180942f974c037f09e2b7f /src | |
parent | 05082ae12051821b1d969e6672d9e4e5afe1bc07 (diff) | |
download | twinkle-d358a52e6124b528fb0bc09eaf4d28c8215e07e7.tar twinkle-d358a52e6124b528fb0bc09eaf4d28c8215e07e7.tar.gz twinkle-d358a52e6124b528fb0bc09eaf4d28c8215e07e7.tar.lz twinkle-d358a52e6124b528fb0bc09eaf4d28c8215e07e7.tar.xz twinkle-d358a52e6124b528fb0bc09eaf4d28c8215e07e7.zip |
Always toggle window visibility when clicking on the systray icon
Left-clicking on the system tray icon should always result in toggling
the visibility of the main window; if the icon is visible and clickble,
then the window can always be hidden via --hide, or on startup via the
"Startup hidden in system tray" option. (In the latter case, this
previously resulted in a hidden and inaccessible window, as reported in
issue #121.)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/mphoneform.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/mphoneform.cpp b/src/gui/mphoneform.cpp index 6c447a8..b829be8 100644 --- a/src/gui/mphoneform.cpp +++ b/src/gui/mphoneform.cpp @@ -3239,12 +3239,7 @@ void MphoneForm::whatsThis() void MphoneForm::sysTrayIconClicked(QSystemTrayIcon::ActivationReason reason) { if (reason == QSystemTrayIcon::Trigger || reason == QSystemTrayIcon::DoubleClick) - { - if (sys_config->get_gui_hide_on_close()) - setVisible(!isVisible()); - else - activateWindow(); - } + setVisible(!isVisible()); } bool MphoneForm::event(QEvent * event) |