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:
1 parent
726082a157
commit
82653fcc20
1 file changed
+1
@@ -1994,6 +1994,7 @@ class GUIManager:
|
|||||||
# ctypes.windll.user32.ShutdownBlockReasonDestroy(self._handle)
|
# ctypes.windll.user32.ShutdownBlockReasonDestroy(self._handle)
|
||||||
else:
|
else:
|
||||||
# use old-style window closing protocol for non-windows platforms
|
# use old-style window closing protocol for non-windows platforms
|
||||||
|
root.protocol("WM_DELETE_WINDOW", self.close)
|
||||||
root.protocol("WM_DESTROY_WINDOW", self.close)
|
root.protocol("WM_DESTROY_WINDOW", self.close)
|
||||||
# stay hidden in tray if needed, otherwise show the window when everything's ready
|
# stay hidden in tray if needed, otherwise show the window when everything's ready
|
||||||
if self._twitch.settings.tray:
|
if self._twitch.settings.tray:
|
||||||
|
|||||||
Reference in new issue
Block a user