Skip to content

Commit 906fafc

Browse files
authored
Merge pull request #6268 from haroldm/patch-1
Re-grab input when automatic capture is enabled
2 parents e28e52d + a308b50 commit 906fafc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Platform/macOS/Display/VMDisplayQemuMetalWindowController.swift

+7-2
Original file line numberDiff line numberDiff line change
@@ -403,19 +403,24 @@ extension VMDisplayQemuMetalWindowController {
403403
func windowDidEnterFullScreen(_ notification: Notification) {
404404
isFullScreen = true
405405
if isFullScreenAutoCapture {
406-
captureMouseToolbarButton.state = .on
407406
captureMouse()
408407
}
409408
}
410409

411410
func windowDidExitFullScreen(_ notification: Notification) {
412411
isFullScreen = false
413412
if isFullScreenAutoCapture {
414-
captureMouseToolbarButton.state = .off
415413
releaseMouse()
416414
}
417415
}
418416

417+
override func windowDidBecomeKey(_ notification: Notification) {
418+
if isFullScreen && isFullScreenAutoCapture {
419+
captureMouse()
420+
}
421+
super.windowDidBecomeKey(notification)
422+
}
423+
419424
override func windowDidResignKey(_ notification: Notification) {
420425
releaseMouse()
421426
super.windowDidResignKey(notification)

0 commit comments

Comments
 (0)