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

Conversation

isaacy13
Copy link

actually close webview when user calls close(), so window doesn't hang around longer than required

actually close webview when user calls `close()`, so window doesn't hang around longer than required
@crossle crossle requested a review from Copilot July 22, 2025 06:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a resource cleanup issue in the macOS desktop webview window implementation by ensuring the window is properly closed when the close() method is called, preventing windows from lingering unnecessarily.

  • Adds explicit window closure call to the WebviewWindowController's cleanup process

Comment on lines 73 to +74
window?.delegate = nil
window?.close()
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant