File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class VMDisplayQemuMetalWindowController: VMDisplayQemuWindowController {
59
59
// MARK: - User preferences
60
60
61
61
@Setting ( " NoCursorCaptureAlert " ) private var isCursorCaptureAlertShown : Bool = false
62
+ @Setting ( " NoFullscreenCursorCaptureAlert " ) private var isFullscreenCursorCaptureAlertShown : Bool = false
62
63
@Setting ( " DisplayFixed " ) private var isDisplayFixed : Bool = false
63
64
@Setting ( " CtrlRightClick " ) private var isCtrlRightClick : Bool = false
64
65
@Setting ( " AlternativeCaptureKey " ) private var isAlternativeCaptureKey : Bool = false
@@ -414,7 +415,7 @@ extension VMDisplayQemuMetalWindowController: VMMetalViewInputDelegate {
414
415
self . window? . makeFirstResponder ( self . metalView)
415
416
self . syncCapsLock ( )
416
417
}
417
- if isCursorCaptureAlertShown {
418
+ if ! isCursorCaptureAlertShown || ( isFullScreen && !isFullscreenCursorCaptureAlertShown ) {
418
419
let alert = NSAlert ( )
419
420
alert. messageText = NSLocalizedString ( " Captured mouse " , comment: " VMDisplayQemuMetalWindowController " )
420
421
@@ -425,7 +426,10 @@ extension VMDisplayQemuMetalWindowController: VMMetalViewInputDelegate {
425
426
alert. showsSuppressionButton = true
426
427
alert. beginSheetModal ( for: window!) { _ in
427
428
if alert. suppressionButton? . state ?? . off == . on {
428
- self . isCursorCaptureAlertShown = false
429
+ self . isCursorCaptureAlertShown = true
430
+ if self . isFullScreen {
431
+ self . isFullscreenCursorCaptureAlertShown = true
432
+ }
429
433
}
430
434
DispatchQueue . main. async ( execute: action)
431
435
}
You can’t perform that action at this time.
0 commit comments