From 82653fcc2014675e793ca01f7c9078819032e6db Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Sun, 28 May 2023 14:04:10 -0300 Subject: [PATCH] tk: also hook into WM_DELETE_WINDOW to quit the app Makes the app exit correctly on Linux when the main window is closed. --- gui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui.py b/gui.py index 6004a97..12c56cc 100644 --- a/gui.py +++ b/gui.py @@ -1994,6 +1994,7 @@ class GUIManager: # ctypes.windll.user32.ShutdownBlockReasonDestroy(self._handle) else: # use old-style window closing protocol for non-windows platforms + root.protocol("WM_DELETE_WINDOW", self.close) root.protocol("WM_DESTROY_WINDOW", self.close) # stay hidden in tray if needed, otherwise show the window when everything's ready if self._twitch.settings.tray: