Author belopolsky
Recipients belopolsky, ned.deily, ronaldoussoren
Date 2011-03-16.14:57:29
SpamBayes Score 5.2109e-06
Marked as misclassified No
Message-id <1300287451.35.0.164099198094.issue11571@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-03-16 14:57:31belopolskysetrecipients: + belopolsky, ronaldoussoren, ned.deily
2011-03-16 14:57:31belopolskysetmessageid: <1300287451.35.0.164099198094.issue11571@psf.upfronthosting.co.za>
2011-03-16 14:57:30belopolskylinkissue11571 messages
2011-03-16 14:57:29belopolskycreate