summaryrefslogtreecommitdiff
path: root/Tools/idle/EditorWindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/idle/EditorWindow.py')
-rw-r--r--Tools/idle/EditorWindow.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py
index f3dacdeb86..96a56de494 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 = [