summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/idle/WindowList.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Tools/idle/WindowList.py b/Tools/idle/WindowList.py
index b9b0bb1..9eb7f3d 100644
--- a/Tools/idle/WindowList.py
+++ b/Tools/idle/WindowList.py
@@ -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