tk: also hook into WM_DELETE_WINDOW to quit the app

Makes the app exit correctly on Linux when the main window is closed.
This commit is contained in:
guihkx authored and DevilXD committed 2023-06-11 16:58:18 +02:00
1 parent 726082a157
commit 82653fcc20
1 file changed
+1
+1
View File
@@ -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: