summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-08-12 15:30:24 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-08-12 15:30:24 -0300
commit733fd79e1da439604bd45587417fe466a6af9d92 (patch)
tree7e76b8ed77232c1fdfeab96090595615391ab967
parent4a04005babda280d1366e6be464777b23688311a (diff)
parente696a9b272d5e82a85925de145e2d4019433217d (diff)
Merge remote-tracking branch 'chiiph/bug/better_hideshow_handling' into develop
-rw-r--r--changes/bug_better_hideshow_handling3
-rw-r--r--src/leap/gui/mainwindow.py6
2 files changed, 7 insertions, 2 deletions
diff --git a/changes/bug_better_hideshow_handling b/changes/bug_better_hideshow_handling
new file mode 100644
index 00000000..3538087b
--- /dev/null
+++ b/changes/bug_better_hideshow_handling
@@ -0,0 +1,3 @@
+ o Activate window when setting it visible. Also display Hide/Show
+ message in the tray icon taking into account the window
+ activation. Fixes #3433. \ No newline at end of file
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()