From e696a9b272d5e82a85925de145e2d4019433217d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 12 Aug 2013 15:23:53 -0300 Subject: Take into account window activation to set visible --- src/leap/gui/mainwindow.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 5ace1043..49a65867 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -610,7 +610,7 @@ class MainWindow(QtGui.QMainWindow): self.tr("Hide Main Window"))[int(visible)] # set labels - visible = self.isVisible() + visible = self.isVisible() and self.isActiveWindow() self._action_visible.setText(get_action(visible)) def _toggle_visible(self): @@ -620,8 +620,10 @@ class MainWindow(QtGui.QMainWindow): Toggles the window visibility """ - if not self.isVisible(): + visible = self.isVisible() and self.isActiveWindow() + if not visible: self.show() + self.activateWindow() self.raise_() else: self.hide() -- cgit v1.2.3