diff options
| -rw-r--r-- | changes/bug_systray_behavior | 2 | ||||
| -rw-r--r-- | src/leap/gui/mainwindow.py | 13 | 
2 files changed, 9 insertions, 6 deletions
| diff --git a/changes/bug_systray_behavior b/changes/bug_systray_behavior new file mode 100644 index 00000000..28b4caa0 --- /dev/null +++ b/changes/bug_systray_behavior @@ -0,0 +1,2 @@ +  o Do not hide the application if the user right clicked the system +    tray icon.
\ No newline at end of file diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 3f29f957..e039fdf1 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -287,18 +287,19 @@ class MainWindow(QtGui.QMainWindow):          self._vpn_systray.setIcon(QtGui.QIcon(self.ERROR_ICON))          self._vpn_systray.setVisible(False) -    def _toggle_visible(self): +    def _toggle_visible(self, reason=None):          """          SLOT          TRIGGER: self._systray.activated          Toggles the window visibility          """ -        self.setVisible(not self.isVisible()) -        action_visible_text = self.tr("Hide") -        if not self.isVisible(): -            action_visible_text = self.tr("Show") -        self._action_visible.setText(action_visible_text) +        if reason != QtGui.QSystemTrayIcon.Context: +            self.setVisible(not self.isVisible()) +            action_visible_text = self.tr("Hide") +            if not self.isVisible(): +                action_visible_text = self.tr("Show") +            self._action_visible.setText(action_visible_text)      def _center_window(self):          """ | 
