summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 25a4c24..81d9470 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -534,11 +534,14 @@ class EditorWindow:
def maybesave(self):
if self.io:
+ if not self.get_saved():
+ if self.top.state()!='normal':
+ self.top.deiconify()
+ self.top.lower()
+ self.top.lift()
return self.io.maybesave()
def close(self):
- self.top.wm_deiconify()
- self.top.tkraise()
reply = self.maybesave()
if reply != "cancel":
self._close()