Skip to content

gpui: Defer native window close cleanup to avoid reentrant app borrow - #66181

Open
Anthony-Eid wants to merge 1 commit into
mainfrom
anth/fix-window-close-double-borrow
Open

Anthony-Eid wants to merge 1 commit into
mainfrom
anth/fix-window-close-double-borrow

Conversation

@Anthony-Eid

Copy link
Copy Markdown
Contributor

Defer the shared native window-close callback to a foreground task so Windows destruction messages can arrive while GPUI is borrowed without panicking or skipping cleanup. The task removes the window if still present, then removes its system tab; a regression test delivers the close notification while the app is borrowed and verifies cleanup after tasks drain. Opus 5.5 review passed, and the focused test passed after rebasing onto main (using Cargo after a Corgi Metal-toolchain failure); the Wasm check passed before rebasing. Native Windows behavior has not been exercised. Fixes FR-531, tracking ZED-CK4.

Release Notes:

  • [GPUI] Fixed a panic when native window destruction re-entered GPUI while the app was borrowed, including on Windows.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 26, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant