Fix OS X issue: window start in foreground

When run from command line, the window starts behind all other windows.
raise_() will bring the window to the front.
This commit is contained in:
Michael Wozniak 2014-04-02 11:29:07 -04:00
parent 5c31263848
commit 3cd4689083
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class ElectrumWindow(QMainWindow):
if reason == QSystemTrayIcon.DoubleClick:
if self.isMinimized() or self.isHidden():
self.show()
self.raise_()
else:
self.hide()
@ -200,11 +201,13 @@ class ElectrumWindow(QMainWindow):
self.config.set_key('lite_mode', False, True)
self.mini.hide()
self.show()
self.raise_()
def go_lite(self):
self.config.set_key('lite_mode', True, True)
self.hide()
self.mini.show()
self.mini.raise_()
def init_lite(self):
@ -217,6 +220,7 @@ class ElectrumWindow(QMainWindow):
sys.exit(0)
self.mini = None
self.show()
self.raise_()
return
actuator = lite_window.MiniActuator(self)