mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.
This commit is contained in:
parent
7c8b89e156
commit
152dfd1dac
2 changed files with 5 additions and 2 deletions
|
@ -997,8 +997,9 @@ class TurtleScreen(TurtleScreenBase):
|
|||
# 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')
|
||||
rootwindow = cv.winfo_toplevel()
|
||||
rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
|
||||
rootwindow.call('wm', 'attributes', '.', '-topmost', '0')
|
||||
|
||||
def clear(self):
|
||||
"""Delete all drawings and all turtles from the TurtleScreen.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue