Skip to content

Commit

Permalink
tart run: set "prohibited" activation policy when --no-graphics is set (
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev authored Nov 7, 2024
1 parent 9c879b3 commit c044306
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/tart/Commands/Run.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c044306

Please sign in to comment.