summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven M. Gava <elguavas@python.net>2002-02-26 02:31:03 (GMT)
committerSteven M. Gava <elguavas@python.net>2002-02-26 02:31:03 (GMT)
commit67716b5f53715e57d147cde9539b8d76a5a56e11 (patch)
treef2f8c4083f6aba65f8be40b03ff25a3bec2539c8
parentbdba32051b402ed5cfd7c1ecc5ba3d9a4fc91371 (diff)
downloadcpython-67716b5f53715e57d147cde9539b8d76a5a56e11.zip
cpython-67716b5f53715e57d147cde9539b8d76a5a56e11.tar.gz
cpython-67716b5f53715e57d147cde9539b8d76a5a56e11.tar.bz2
bugfix for the problem where EditorWindow instances
would appear to freeze for a few seconds on closing in some cases when running under X
-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()