mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-21 08:01:33 +01:00
4d847859f5
Closes #59397 Wayland activation requests previously shared a single pending-action slot. Concurrent requests could overwrite that slot, leaving an issued token unused and Mutter's global launch indicator active until its timeout. Each activation token now carries its own pending window, URI, or path action. This prevents requests from overwriting one another and removes the resulting unpaired-token error. Track the latest eligible keyboard or pointer press together with the surface that received it. Window activation uses that context when available; without it, it still requests a token for the target surface so the compositor can indicate that the window wants attention. URI/path opens use the input context when available and otherwise retain the tokenless fallback. Launcher-provided startup token handling remains unchanged. The approach builds on the investigation and prototype attached to #59397, but does not combine serials from unrelated Wayland protocols. Test results: - `cargo fmt --all -- --check`: passed after formatting the follow-up changes. - `cargo test -p gpui_linux --lib`: 50 passed. - `cargo build -p zed`: passed. - `./script/clippy -p gpui_linux`: passed (release, all targets/features, warnings denied). The wrapper skipped its later optional checks because `cargo-shear` is not installed. - Current-head (`412dc7f6f6`) cold-start smoke test under isolated headless Mutter 51.0 with `WAYLAND_DEBUG=client`: two startup activation requests, two returned tokens, both tokens passed to `activate`, and 37 surface buffer attachments. No unpaired-token error appeared. Startup intentionally issues activation requests now. - Earlier manual GNOME testing covered the original implementation, before the attention-preserving follow-up. A visual GNOME busy-cursor check, launcher-provided-token launch, new-window shortcut, and URL-opening retest of the current head remain outstanding; the headless startup trace does not cover those interactions. Release Notes: - Fixed the global busy cursor lingering after Zed opens on GNOME Wayland. - [GPUI] Fixed concurrent Wayland activation requests losing their pending actions and improved keyboard-triggered activation context tracking. --------- Co-authored-by: Anthony <hello@anthonyeid.me>