Skip to content

Commit 67716b5

Browse files
author
Steven M. Gava
committed
bugfix for the problem where EditorWindow instances
would appear to freeze for a few seconds on closing in some cases when running under X
1 parent bdba320 commit 67716b5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,14 @@ def close_event(self, event):
534534

535535
def maybesave(self):
536536
if self.io:
537+
if not self.get_saved():
538+
if self.top.state()!='normal':
539+
self.top.deiconify()
540+
self.top.lower()
541+
self.top.lift()
537542
return self.io.maybesave()
538543

539544
def close(self):
540-
self.top.wm_deiconify()
541-
self.top.tkraise()
542545
reply = self.maybesave()
543546
if reply != "cancel":
544547
self._close()

0 commit comments

Comments
 (0)