Skip to content

[desktop_webview_window] macos close webview process #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class WebviewWindowController: NSWindowController {
webViewController.destroy()
webviewPlugin = nil
window?.delegate = nil
window?.close()
Comment on lines 73 to +74
Copy link
Preview

Copilot AI Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider calling window?.close() before setting window?.delegate = nil to ensure proper cleanup order. The delegate should remain active during the window closing process to handle any final window events.

Suggested change
window?.delegate = nil
window?.close()
window?.close()
window?.delegate = nil

Copilot uses AI. Check for mistakes.

window = nil
}

Expand Down