Skip to content

Commit

Permalink
Merge pull request #6268 from haroldm/patch-1
Browse files Browse the repository at this point in the history
Re-grab input when automatic capture is enabled
  • Loading branch information
osy authored Apr 30, 2024
2 parents e28e52d + a308b50 commit 906fafc
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,19 +403,24 @@ extension VMDisplayQemuMetalWindowController {
func windowDidEnterFullScreen(_ notification: Notification) {
isFullScreen = true
if isFullScreenAutoCapture {
captureMouseToolbarButton.state = .on
captureMouse()
}
}

func windowDidExitFullScreen(_ notification: Notification) {
isFullScreen = false
if isFullScreenAutoCapture {
captureMouseToolbarButton.state = .off
releaseMouse()
}
}

override func windowDidBecomeKey(_ notification: Notification) {
if isFullScreen && isFullScreenAutoCapture {
captureMouse()
}
super.windowDidBecomeKey(notification)
}

override func windowDidResignKey(_ notification: Notification) {
releaseMouse()
super.windowDidResignKey(notification)
Expand Down

0 comments on commit 906fafc

Please sign in to comment.