From e6c6ee18f2928065b21ebc50e91a331334b22188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 11 Jul 2013 11:11:57 -0300 Subject: Always raise the window that is intended to be shown --- changes/bug_osx_raise_window | 1 + src/leap/gui/mainwindow.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 changes/bug_osx_raise_window diff --git a/changes/bug_osx_raise_window b/changes/bug_osx_raise_window new file mode 100644 index 00000000..ee81fd2b --- /dev/null +++ b/changes/bug_osx_raise_window @@ -0,0 +1 @@ + o OSX: Raise window when showing if running on OSX. \ No newline at end of file diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 7bcd54b0..4874de80 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -39,14 +39,13 @@ from leap.gui.loggerwindow import LoggerWindow from leap.gui.wizard import Wizard from leap.gui.login import LoginWidget from leap.gui.statuspanel import StatusPanelWidget -from leap.platform_init import IS_MAC from leap.services.eip.eipbootstrapper import EIPBootstrapper from leap.services.eip.eipconfig import EIPConfig from leap.services.eip.providerbootstrapper import ProviderBootstrapper # XXX: comment out soledad temporarily to avoid problem in Windows, issue #2932 # from leap.services.soledad.soledadbootstrapper import SoledadBootstrapper from leap.services.mail.smtpbootstrapper import SMTPBootstrapper -from leap.platform_init import IS_WIN +from leap.platform_init import IS_WIN, IS_MAC from leap.platform_init.initializers import init_platform from leap.services.eip.vpnprocess import VPN @@ -319,6 +318,8 @@ class MainWindow(QtGui.QMainWindow): # Do NOT use exec_, it will use a child event loop! # Refer to http://www.themacaque.com/?p=1067 for funny details. self._wizard.show() + if IS_MAC: + self._wizard._raise() self._wizard.finished.connect(self._wizard_finished) def _wizard_finished(self): @@ -434,6 +435,8 @@ class MainWindow(QtGui.QMainWindow): self._login_widget.set_providers(self._configured_providers()) self._show_systray() self.show() + if IS_MAC: + self.raise_() if self._wizard: possible_username = self._wizard.get_username() @@ -1287,6 +1290,8 @@ class MainWindow(QtGui.QMainWindow): self.show() self.setWindowFlags(self.windowFlags() & ~TOPFLAG) self.show() + if IS_MAC: + self._raise() def _cleanup_pidfiles(self): """ -- cgit v1.2.3