[issue11571] Turtle window pops under the terminal on OSX

Alexander Belopolsky report at bugs.python.org
Wed Mar 16 15:57:31 CET 2011


New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

If you have a large enough terminal window and run

$ python -m turtle

on OSX, you will see nothing because turtle screen pops under the terminal.

Ned Deily suggested in msg130421 that this can be fixed by setting "-topmost" WM attribute on the root window.  However, if you apply the following patch:

diff -r 71b182134853 Lib/turtle.py
--- a/Lib/turtle.py	Wed Mar 16 09:44:26 2011 -0400
+++ b/Lib/turtle.py	Wed Mar 16 10:49:22 2011 -0400
@@ -993,6 +993,7 @@
         self._colormode = _CFG["colormode"]
         self._keys = []
         self.clear()
+        cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
 
     def clear(self):
         """Delete all drawings and all turtles from the TurtleScreen.

The result is that turtle window stays on top even if you shift focus back to the terminal.

The correct behavior would be for the turtle screen to pop on top, ideally without receiving the focus, but allow users to obscure it with another window if they wish.

----------
assignee: ronaldoussoren
components: Library (Lib), Macintosh
messages: 131124
nosy: belopolsky, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Turtle window pops under the terminal on OSX
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11571>
_______________________________________


More information about the Python-bugs-list mailing list