From c0443060cfe3612cbd6fcdaf0f64b97196c14a3a Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 7 Nov 2024 21:20:09 +0100 Subject: [PATCH] tart run: set "prohibited" activation policy when --no-graphics is set (#939) --- Sources/tart/Commands/Run.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index 2988178..c574772 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -472,8 +472,10 @@ struct Run: AsyncParsableCommand { let useVNCWithoutGraphics = (vnc || vncExperimental) && !graphics if noGraphics || useVNCWithoutGraphics { - // enter the main even loop, without bringing up any UI, - // and just wait for the VM to exit. + // Enter the main event loop without bringing up any UI, + // waiting for the VM to exit. + NSApplication.shared.setActivationPolicy(.prohibited) + NSApplication.shared.run() } else { runUI(suspendable, captureSystemKeys)