summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-07-28 16:49:44 -0300
committerTomás Touceda <chiiph@leap.se>2014-08-01 13:57:54 -0300
commit7e1d8b4f66577fb9f4775f16fffd02bc4ae57100 (patch)
treed757cd2c36dad65ea2c7e45d5998930ad6ac265b /src/leap/bitmask
parent19b74b597bd4d33bb3ea7f95fd4fffcadf372ccd (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.
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py5
1 files changed, 5 insertions, 0 deletions
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()