From 59e4e7d170ad2cc64ccd1a06ab876f479ca5f190 Mon Sep 17 00:00:00 2001 From: scosman Date: Mon, 12 Aug 2024 10:37:18 -0400 Subject: [PATCH] shutdown test --- desktop/desktop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/desktop.py b/desktop/desktop.py index 10cf902e..6b711a00 100644 --- a/desktop/desktop.py +++ b/desktop/desktop.py @@ -91,6 +91,7 @@ def run_taskbar(): tray = pystray.Icon("fune", image, "fune", menu) # running detached since we use tk mainloop to get events from dock icon tray.run_detached() + return tray def close_splash(): @@ -122,7 +123,9 @@ def close_splash(): root.withdraw() # remove the window # Register callback for the dock icon to reopen the web app root.createcommand("tk::mac::ReopenApplication", show_studio) - run_taskbar() + tray = run_taskbar() root.after(10, show_studio) root.after(10, close_splash) root.mainloop() + tray.stop() + raise SystemExit(0)