diff options
author | Steven M. Gava <elguavas@python.net> | 2002-02-26 02:31:03 (GMT) |
---|---|---|
committer | Steven M. Gava <elguavas@python.net> | 2002-02-26 02:31:03 (GMT) |
commit | 67716b5f53715e57d147cde9539b8d76a5a56e11 (patch) | |
tree | f2f8c4083f6aba65f8be40b03ff25a3bec2539c8 /Lib | |
parent | bdba32051b402ed5cfd7c1ecc5ba3d9a4fc91371 (diff) | |
download | cpython-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
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 7 |
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() |