summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/EditorWindow.py6
-rw-r--r--Tools/idle/WindowList.py6
2 files changed, 8 insertions, 4 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py
index f3dacde..96a56de 100644
--- a/Tools/idle/EditorWindow.py
+++ b/Tools/idle/EditorWindow.py
@@ -157,8 +157,10 @@ class EditorWindow:
menu.configure(postcommand=self.postwindowsmenu)
def wakeup(self):
- self.top.tkraise()
- self.top.wm_deiconify()
+ if self.top.wm_state() == "iconic":
+ self.top.wm_deiconify()
+ else:
+ self.top.tkraise()
self.text.focus_set()
menu_specs = [
diff --git a/Tools/idle/WindowList.py b/Tools/idle/WindowList.py
index 9eb7f3d..537b31c 100644
--- a/Tools/idle/WindowList.py
+++ b/Tools/idle/WindowList.py
@@ -49,8 +49,10 @@ class ListedToplevel(Toplevel):
def wakeup(self):
try:
- self.tkraise()
- self.wm_deiconify()
+ if self.wm_state() == "iconic":
+ self.wm_deiconify()
+ else:
+ self.tkraise()
self.focus_set()
except TclError:
# This can happen when the window menu was torn off.