diff options
author | kali <kali@leap.se> | 2012-12-27 07:08:10 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-12-27 07:08:10 +0900 |
commit | b2e1e26e182bc86e01440ab3a93d3953f1fbcb4b (patch) | |
tree | b731e31bc8ba7617634fb3f1c65ddfcdc89085cb | |
parent | b4af406e6cf233d939e3dfa5b5c9b2241b6d8ea0 (diff) |
fix window not raising to front in osx
-rwxr-xr-x | openvpn/build.zsh | 2 | ||||
-rw-r--r-- | src/leap/app.py | 2 | ||||
-rw-r--r-- | src/leap/baseapp/systray.py | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/openvpn/build.zsh b/openvpn/build.zsh index 87c591cc..b36717c1 100755 --- a/openvpn/build.zsh +++ b/openvpn/build.zsh @@ -188,4 +188,4 @@ case "$target" in *) error "Unknown target: $target" ;; -esac
\ No newline at end of file +esac diff --git a/src/leap/app.py b/src/leap/app.py index 334b58c8..7b8ac3cd 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -108,6 +108,8 @@ def main(): # if not, it will be set visible # from the systray menu. window.show() + if sys.platform == "darwin": + window.raise_() # run main loop sys.exit(app.exec_()) diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py index 0dd0f195..93fab716 100644 --- a/src/leap/baseapp/systray.py +++ b/src/leap/baseapp/systray.py @@ -1,4 +1,6 @@ import logging +import sys + import sip sip.setapi('QString', 2) sip.setapi('QVariant', 2) @@ -156,6 +158,8 @@ class StatusAwareTrayIconMixin(object): self.hide() else: self.show() + if sys.platform == "darwin": + self.raise_() def about(self): # move to widget |