diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py index 7e05a57c032..542b738674f 100644 --- a/Lib/idlelib/WindowList.py +++ b/Lib/idlelib/WindowList.py @@ -67,6 +67,10 @@ def __init__(self, master, **kw): 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