From 7e1d8b4f66577fb9f4775f16fffd02bc4ae57100 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 28 Jul 2014 16:49:44 -0300 Subject: 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. --- changes/5870_bitmask-prevent-system-logout-on-linux | 1 + src/leap/bitmask/gui/mainwindow.py | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 changes/5870_bitmask-prevent-system-logout-on-linux 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 943e92ea..0bcbc1d1 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1099,6 +1099,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() -- cgit v1.2.3