macOS: fix VoiceWakeOverlayController exclusivity violation #39275

This commit is contained in:
Felix Hellström
2026-03-08 02:00:46 +01:00
committed by Peter Steinberger
parent eebee84093
commit 58ae5582f4
4 changed files with 11 additions and 6 deletions

View File

@@ -64,15 +64,14 @@ enum OverlayPanelFactory {
@MainActor
static func present(
window: NSWindow?,
isVisible: inout Bool,
isFirstPresent: Bool,
target: NSRect,
startOffsetY: CGFloat = -6,
onFirstPresent: (() -> Void)? = nil,
onAlreadyVisible: (NSWindow) -> Void)
{
guard let window else { return }
if !isVisible {
isVisible = true
if isFirstPresent {
onFirstPresent?()
let start = target.offsetBy(dx: 0, dy: startOffsetY)
self.animatePresent(window: window, from: start, to: target)