Skip to content

Commit

Permalink
shutdown test
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Aug 12, 2024
1 parent 59e4e7d commit 7d9c43a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions desktop/desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,19 @@ def quit_app():
if root:
root.destroy()

raise SystemExit(0)
sys.exit(0)


def on_quit():
global root
# use main runloop if possible
if root:
root.after(100, quit_app)
else:
raise SystemExit(0)
try:
if root:
root.after(100, quit_app)
else:
sys.exit(0)
finally:
sys.exit(0)


def run_taskbar():
Expand Down Expand Up @@ -116,7 +119,7 @@ def close_splash():
if not uni_server.running():
# Can't start. Likely a port is already in use. Show the web app instead and exit
show_studio()
exit(0)
sys.exit(0)
# TK without a window, to get dock events on MacOS
root = tk.Tk()
root.title("fune")
Expand All @@ -128,4 +131,4 @@ def close_splash():
root.after(10, close_splash)
root.mainloop()
tray.stop()
raise SystemExit(0)
sys.exit(0)

0 comments on commit 7d9c43a

Please sign in to comment.