diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-07-28 16:49:44 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-07-28 16:53:35 -0300 |
commit | 72b6e999c883272cbe291ac610c528b5ae51077b (patch) | |
tree | c9d28625b0b1838f4517a84f244c281fdbc76cc1 | |
parent | eafe21247a149d0c302e02007927ea25e65dca34 (diff) |
Do `quit()` if the system requested the app to close.
This fixes the issue where a system logout was blocked by bitmask since
we were interpreting the closeEvent as if the user clicked on the 'X'
button.
Closes #5870.
-rw-r--r-- | changes/5870_bitmask-prevent-system-logout-on-linux | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/changes/5870_bitmask-prevent-system-logout-on-linux b/changes/5870_bitmask-prevent-system-logout-on-linux new file mode 100644 index 00000000..6feba46c --- /dev/null +++ b/changes/5870_bitmask-prevent-system-logout-on-linux @@ -0,0 +1 @@ +- Bitmask on linux prevents session logout. Closes #5870. diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 2f78fd14..4f7f519c 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1138,6 +1138,11 @@ class MainWindow(QtGui.QMainWindow): """ Reimplementation of closeEvent to close to tray """ + if not e.spontaneous(): + # if the system requested the `close` then we should quit. + self.quit() + return + if QtGui.QSystemTrayIcon.isSystemTrayAvailable() and \ not self._really_quit: self._toggle_visible() |