[Python-checkins] cpython (merge 3.4 -> default): Issue #11571: merge with 3.4
ned.deily
python-checkins at python.org
Sun Apr 20 04:15:36 CEST 2014
http://hg.python.org/cpython/rev/01228d7b5e01
changeset: 90418:01228d7b5e01
parent: 90416:2a4401109672
parent: 90417:1f3946b22e64
user: Ned Deily <nad at acm.org>
date: Sat Apr 19 19:12:31 2014 -0700
summary:
Issue #11571: merge with 3.4
files:
Lib/turtle.py | 7 +++++++
Misc/NEWS | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Lib/turtle.py b/Lib/turtle.py
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -109,6 +109,7 @@
import math
import time
import inspect
+import sys
from os.path import isfile, split, join
from copy import deepcopy
@@ -992,6 +993,12 @@
self._colormode = _CFG["colormode"]
self._keys = []
self.clear()
+ if sys.platform == 'darwin':
+ # Force Turtle window to the front on OS X. This is needed because
+ # the Turtle window will show behind the Terminal window when you
+ # start the demo from the command line.
+ cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
+ cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '0')
def clear(self):
"""Delete all drawings and all turtles from the TurtleScreen.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -247,6 +247,9 @@
- Issue #21311: Avoid exception in _osx_support with non-standard compiler
configurations. Patch by John Szakmeister.
+- Issue #11571: Ensure that the turtle window becomes the topmost window
+ when launched on OS X.
+
Extension Modules
-----------------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list