aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorKataoka Katsuki <49934462+kataokatsuki@users.noreply.github.com>2026-08-04 23:46:43 +0900
committerGitHub <noreply@github.com>2026-08-04 17:46:43 +0300
commit1997b88b3fa45f838d44e69dcebde8acf33899fc (patch)
treeff406e43cb3eec45f57e38ccf77a36127df35b53 /src/server
parentcc9fa47540d8525f24fe46a10f759ca40090a6e0 (diff)
fix(input): keep pending url clicks across host focus loss (#2291)
Opening a URL raises the browser, which takes focus away from the host terminal before the mouse release arrives. release_input_source(_headless) cleared pending_url_click_sources on that focus loss, so the release was forwarded to the pane and the agent opened the same URL again. Clear the set in clear_input_source instead, whose only production caller is remove_client. refs #2290 Co-authored-by: kataokatsuki <kataokatsuki@users.noreply.github.com>
Diffstat (limited to 'src/server')
-rw-r--r--src/server/headless.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/headless.rs b/src/server/headless.rs
index 752f8e8c..b4f433f7 100644
--- a/src/server/headless.rs
+++ b/src/server/headless.rs
@@ -2710,7 +2710,8 @@ impl HeadlessServer {
.iter()
.any(|event| matches!(event, crate::raw_input::RawInputEvent::OuterFocusLost))
{
- self.app.clear_input_source(client_id);
+ // Focus loss is not a teardown, so the pending URL click stays.
+ self.app.release_input_source_headless(client_id);
}
}
let events = events_for_app_routing(events, source_was_foreground, source_is_full_app);