fix: resolve unexpected miniwindow loop closure on Mac (#12106)

fix: resolve unexpected miniwindow loop closure on MacOS 26+
This commit is contained in:
Tsingv 2026-01-04 14:29:00 +08:00 committed by GitHub
parent f8519f0bf0
commit 2383fd06db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -643,6 +643,11 @@ export class WindowService {
return
} else if (isMac) {
this.miniWindow.hide()
const majorVersion = parseInt(process.getSystemVersion().split('.')[0], 10)
if (majorVersion >= 26) {
// on macOS 26+, the popup of the mimiWindow would not change the focus to previous application.
return
}
if (!this.wasMainWindowFocused) {
app.hide()
}