Commit 828f3fec authored by Guido van Rossum's avatar Guido van Rossum

Don't traceback when wakeup() is called when the window has been destroyed.

This can happen when a torn-of Windows menu references closed windows.
And Tim Peters claims that the Windows menu is his favorite to tear off...
parent d0123ec2
......@@ -48,6 +48,11 @@ class ListedToplevel(Toplevel):
return self.wm_title()
def wakeup(self):
self.tkraise()
self.wm_deiconify()
self.focus_set()
try:
self.tkraise()
self.wm_deiconify()
self.focus_set()
except TclError:
# This can happen when the window menu was torn off.
# Simply ignore it.
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment