Properly enter main even loop in headless mode (#651)

Fixes #638
This commit is contained in:
Fedor Korotkov 2023-11-08 15:05:00 -05:00 committed by GitHub
parent c75009e46f
commit b2c923f2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}