diff --git a/magictk/basicwindow.py b/magictk/basicwindow.py index e43aa84..59d6842 100644 --- a/magictk/basicwindow.py +++ b/magictk/basicwindow.py @@ -68,6 +68,7 @@ class Tk(ttk.Frame): self.place(x=0, y=0, relwidth=1, relheight=1) self.main_tk.geometry( f"{self.w}x{self.h}+{self.x}+{self.y}") + self.main_tk.protocol("WM_DELETE_WINDOW", lambda *args: self.quit()) def mainloop(self) -> None: t_start = time.time()