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
2023-05-28 14:04:10 -03:00
committed by DevilXD
parent 726082a157
commit 82653fcc20

1
gui.py
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: