From: Steven M. Gava Date: Tue, 26 Feb 2002 02:31:03 +0000 (+0000) Subject: bugfix for the problem where EditorWindow instances X-Git-Tag: v2.3c1~6623 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67716b5f53715e57d147cde9539b8d76a5a56e11;p=python bugfix for the problem where EditorWindow instances would appear to freeze for a few seconds on closing in some cases when running under X --- diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 25a4c24e5f..81d9470357 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()