[issue11571] Turtle window pops under the terminal on OSX

2014-08-23 Thread Ned Deily

Ned Deily added the comment:

As identified in Issue22168, the changes introduced here do not work when the 
user supplies a Canvas rather than relying on the turtle default.  There is a 
patch there that should solve that issue.  But I now think that the original 
approach was not an ideal solution.  For one, it introduced Tk-specific code 
into TurtleScreen, which is supposed to be independent of the underlying 
graphics toolkit.  Two, as we now know from subsequent work, though the setting 
of the -topmost attribute does move the window to the front, it does not change 
which gui application has the keyboard and menu focus.  So the user still needs 
to click on the now-raised window to interact with it.  The code added to 
Lib/turtledemo/__main__.py in Issue17172 solves that problem through the use of 
a little Applescript.  There are a number of turtle and turtledemo changes 
pending at the moment.  It might be worthwhile to re-examine this (perhaps, as 
earlier suggested, try to deal with it at the tkinter level through
  an option) after the dust settles.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2014-04-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f3946b22e64 by Ned Deily in branch '3.4':
Issue #11571: Ensure that the turtle window becomes the topmost window
http://hg.python.org/cpython/rev/1f3946b22e64

New changeset 01228d7b5e01 by Ned Deily in branch 'default':
Issue #11571: merge with 3.4
http://hg.python.org/cpython/rev/01228d7b5e01

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2014-04-19 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
versions: +Python 3.4, Python 3.5 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2014-04-19 Thread Ned Deily

Ned Deily added the comment:

The fix for turtle has been applied for release in 3.4.1 and 3.5.0.

--
resolution: wont fix - fixed
stage: commit review - resolved

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2013-11-24 Thread James Cook

James Cook added the comment:

This problem still exists with the version of turtle bundled with python 3.3.3 
and ActiveState ActiveTcl8.5.15.1.  While it may be an issue with the 
underlying platform, it's unfortunate for young beginners just learning python 
who don't understand the underlying issue.

If other parents are searching for a solution, this works:

turtle.getscreen()._root.attributes('-topmost', 1)
turtle.getscreen()._root.attributes('-topmost', 0)

Any chance the workaround patch could be applied so I don't have to tell my kid 
to add this magic to his scripts?

--
nosy: +James.Cook

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2013-07-31 Thread Alexander Belopolsky

Changes by Alexander Belopolsky alexander.belopol...@gmail.com:


--
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2013-07-07 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I'm revisiting some old issues, and while I don't mind adding workarounds to 
the various scripts I do not consider this to be a bug. This is unexpected 
behavior from the platform, and only affects running scripts from the 
command-line (bundling the script in an app bundle would result in a window 
that pops up in front when the app is launched).

I'm unassigning the issue because I'm no longer interested in working on this.

--
assignee: ronaldoussoren - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Marc Abramowitz

Marc Abramowitz msabr...@gmail.com added the comment:

I wonder if this could be applied at some lower level in TkInter, because this 
bug happens with every Tk app -- e.g.: turtle, idle, web2py

--
nosy: +Marc.Abramowitz

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Removed file: http://bugs.python.org/file21581/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Marc, it could although that would be a change in behavior that possibly might 
not be desired by all tkinter apps. Perhaps the thing to do is add an optional 
topmost argument to tkinter.Tk() with the default value being True.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

On 07 Apr, 2011,at 07:03 PM, Alexander Belopolsky rep...@bugs.python.org 
wrote:

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

While you are at it, can you also fix the same issue with python -m tkinter?
 
Sure, I can add a hack to that module as well.

Ronald

--
Added file: http://bugs.python.org/file21581/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___htmlbodydivbrbrOn 07 Apr, 2011,at 07:03 PM, Alexander Belopolsky 
lt;rep...@bugs.python.orggt; wrote:brbr/divdivblockquote 
type=citediv class=msg-quotediv class=_stretchbr
Alexander Belopolsky lt;a href=mailto:belopol...@users.sourceforge.net; 
_mce_href=mailto:belopol...@users.sourceforge.net;belopol...@users.sourceforge.net/agt;
 added the comment:br
br
While you are at it, can you also fix the same issue with python -m 
tkinter?/div/div/blockquotespannbsp;/span/divdivspanSure, I 
can add a hack to that module as 
well./span/divdivspanbr/span/divdivspanRonald/span/divdivblockquote
 type=citediv class=msg-quotediv class=_stretchspan style=color: 
rgb(0, 0, 0); span style=color: rgb(0, 51, 153); font 
class=Apple-style-span color=#00 face=Helvetica, Arial, 
sans-serifbr/font/span/span/div/div/blockquote/div/body/html
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

+1 on applying the patch. 

I can do so on Sunday but feel to apply the patch before that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

While you are at it, can you also fix the same issue with python -m tkinter?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

.. and python -m turtledemo?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-04-04 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Looks good to me.  I tested on OS X with both Tk 8.5 on 10.6 and Tk 8.4 on 
10.5.  The demo runs fine under IDLE.app and bin/idle3.  If no objections, I'll 
commit the patch with the nit addressed.

--
keywords: +patch
stage:  - commit review
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file21529/issue11571.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-03-16 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@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 rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-03-16 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
dependencies: +Tkinter windows pop under the terminal in OSX

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-03-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The attached patch forces the window to the front by first making the window a 
topmost window and then resetting that flag.

Could you test if this does want you'd like it to?

(The patch is for 3.3, will backport upto 2.7 when the behavior is correct)

--
Added file: http://bugs.python.org/file21242/issue-11571.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11571] Turtle window pops under the terminal on OSX

2011-03-16 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Wed, Mar 16, 2011 at 11:26 AM, Ronald Oussoren
rep...@bugs.python.org wrote:
..
 The attached patch forces the window to the front by first making the window
 a topmost window and then resetting that flag.

 Could you test if this does want you'd like it to?

Yes, this works.  Nice trick - did not think of it.

I don't use idle, but someone should test that this works when turtle
is used by idle.  It works fine when I start idle from command line
(in which case idle itself pops under the terminal), but I understand
that most users start idle from Finder or the Dock and I don't have
that set up.

A nit-pick: in the current turtle code module imports and from module
imports are visually separated.   Consider moving import sys below
import inspect.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com