Skip to content

Commit

Permalink
display(apple): automatically capture system keys on fullscreen
Browse files Browse the repository at this point in the history
Resolves #3668
  • Loading branch information
osy committed Jul 17, 2023
1 parent e5ce5f4 commit e15b878
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Platform/macOS/Display/VMDisplayAppleDisplayWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ class VMDisplayAppleDisplayWindowController: VMDisplayAppleWindowController {
override func captureMouseButtonPressed(_ sender: Any) {
appleView!.capturesSystemKeys = captureMouseToolbarButton.state == .on
}

func windowDidEnterFullScreen(_ notification: Notification) {
captureMouseToolbarButton.state = .on
captureMouseButtonPressed(self)
}

func windowDidExitFullScreen(_ notification: Notification) {
captureMouseToolbarButton.state = .off
captureMouseButtonPressed(self)
}
}

0 comments on commit e15b878

Please sign in to comment.