summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/WindowList.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py
index 7e05a57..542b738 100644
--- a/Lib/idlelib/WindowList.py
+++ b/Lib/idlelib/WindowList.py
@@ -67,6 +67,10 @@ class ListedToplevel(Toplevel):
def destroy(self):
registry.delete(self)
Toplevel.destroy(self)
+ # If this is Idle's last window then quit the mainloop
+ # (Needed for clean exit on Windows 98)
+ if not registry.dict:
+ self.quit()
def get_title(self):
# Subclass can override