Skip to content

Commit

Permalink
macOS: close window when VM stops
Browse files Browse the repository at this point in the history
Resolves #2410
  • Loading branch information
osy committed Apr 25, 2021
1 parent 820087a commit d1a0746
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Platform/macOS/Display/VMDisplayWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ extension VMDisplayWindowController: UTMVirtualMachineDelegate {
showErrorAlert(message) { _ in
self.close()
}
case .vmStopped, .vmPaused, .vmSuspended:
case .vmStopped:
NSCursor.unhide()
self.close()
case .vmPaused, .vmSuspended:
enterSuspended(isBusy: false)
case .vmPausing, .vmStopping, .vmStarting, .vmResuming:
enterSuspended(isBusy: true)
Expand Down

0 comments on commit d1a0746

Please sign in to comment.