From a7a4be2dab63bdc614e71d7aa050a6a2a1b364c3 Mon Sep 17 00:00:00 2001 From: cxykevin Date: Sat, 27 Apr 2024 22:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbasicwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magictk/basicwindow.py | 1 + 1 file changed, 1 insertion(+) 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()