From 667396904c8469b0e5efae50d1017cd42ab1ff2c Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Sat, 19 May 2012 10:09:38 -0500 Subject: [PATCH] use applescript to force slash screen on to, thanks Marc --- VERSION | 2 +- gluon/widget.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 23782032..8e3f204b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-19 10:07:52) dev +Version 2.00.0 (2012-05-19 10:09:36) dev diff --git a/gluon/widget.py b/gluon/widget.py index 8542b056..185a1af6 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -983,6 +983,17 @@ def start(cron=True): if root: root.focus_force() + + # Mac OS X - make the GUI window rise to the top + if os.path.exists("/usr/bin/osascript"): + applescript = """ +tell application "System Events" + set proc to first process whose unix id is %d + set frontmost of proc to true +end tell +""" % (os.getpid()) + os.system("/usr/bin/osascript -e '%s'" % applescript) + if not options.quiet: presentation(root) master = web2pyDialog(root, options)