diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-17 15:41:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-17 15:41:23 +0100 |
commit | cefb6e20c2e0ed55a0951ba37ffb8bdd475c420e (patch) | |
tree | dfa8c1068c409ebad0a3ad0f3bde020a2cd2f94e /variant | |
parent | 65666424847bc9d3c46af82d8cd1237398a4c607 (diff) |
variant/default: fix close button with tray
Using the close button must exit the program regardless
of whether the tray is enabled. Restore that behavior.
Reported-by: @albertolg
Issue: #750
Diffstat (limited to 'variant')
-rw-r--r-- | variant/default/main-window.cpp | 13 | ||||
-rw-r--r-- | variant/default/main-window.hpp | 1 |
2 files changed, 0 insertions, 14 deletions
diff --git a/variant/default/main-window.cpp b/variant/default/main-window.cpp index 03e58af4..af9c6de2 100644 --- a/variant/default/main-window.cpp +++ b/variant/default/main-window.cpp @@ -886,19 +886,6 @@ void main_window::changeEvent(QEvent* e) e->ignore(); } -void main_window::closeEvent(QCloseEvent* ev) -{ - if (tray && tray->isVisible()) - { - ev->ignore(); - setVisible(false); - } - else - { - ev->accept(); - } -} - bool main_window::event(QEvent* event) { using t = QEvent::Type; diff --git a/variant/default/main-window.hpp b/variant/default/main-window.hpp index c69f1c0b..b4b7dbb7 100644 --- a/variant/default/main-window.hpp +++ b/variant/default/main-window.hpp @@ -97,7 +97,6 @@ class main_window : public QMainWindow, private State void init_tray(); void changeEvent(QEvent* e) override; - void closeEvent(QCloseEvent* ev) override; bool event(QEvent *event) override; bool maybe_hide_to_tray(QEvent* e); #if !defined _WIN32 && !defined __APPLE__ |