Coalesce stale focus raises during rapid focus movement#322
Coalesce stale focus raises during rapid focus movement#322corpooo wants to merge 1 commit intoacsandmann:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfedbaf1ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Err(e) = app_state.handle.send(Request::Raise( | ||
| vec![window_id], | ||
| CancellationToken::new(), | ||
| 0, | ||
| Quiet::Yes, |
There was a problem hiding this comment.
Keep immediate MoveFocus raises cancellable
This direct send creates a standalone Request::Raise with a fresh CancellationToken and sequence_id 0, which means it is not tracked by RaiseManager and cannot be superseded when a newer focus target arrives. In rapid cross-app focus movement, the older immediate request can still finish later (notably when handle_raise_request is waiting on activation) and steal focus back from the newer target, reintroducing stale-focus behavior despite the new coalescing logic. Please route this through the same cancellation path as managed raise sequences (or otherwise keep a cancel handle for the latest immediate focus request).
Useful? React with 👍 / 👎.
Summary
Testing