From b2c923f2fefd37f6231c9625ffdbd73ee9b51789 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Wed, 8 Nov 2023 15:05:00 -0500 Subject: [PATCH] Properly enter main even loop in headless mode (#651) Fixes #638 --- Sources/tart/Commands/Run.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index e0f2fb9d..390aa3f9 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -312,7 +312,8 @@ struct Run: AsyncParsableCommand { let useVNCWithoutGraphics = (vnc || vncExperimental) && !graphics if noGraphics || useVNCWithoutGraphics { - dispatchMain() + // enter the main even loop and just wait for the VM to exit + NSApplication.shared.run() } else { runUI(suspendable, captureSystemKeys) }