From ab9375cef71c3cbc4bdaecbe93f057e89a74e24e Mon Sep 17 00:00:00 2001 From: Francesco Bonacci Date: Fri, 26 Jun 2026 21:37:01 -0700 Subject: [PATCH] fix(cua-driver/linux): glide the agent cursor to the desktop-scope click point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Linux window-less desktop-scope click warped only the *real* pointer (XTest) and never moved the agent-cursor *overlay* — unlike the macOS/Windows desktop paths, which glide it. So the most visible cursor on screen sat idle wherever it was last, while the click landed elsewhere: a viewer (and a screen recording) sees the cursor "click somewhere else" even though the action is correct (the harness counter does advance). Reuse the existing `overlay_glide_to_for` helper to glide the overlay to (sx,sy) before the XTest click, matching the other platforms. Cosmetic/UX + makes the desktop-scope action legible in recordings. Caught by inspecting the Linux desktop-scope demo recording frame-by-frame. Co-Authored-By: Claude Opus 4.8 --- .../cua-driver/rust/crates/platform-linux/src/tools/impl_.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/cua-driver/rust/crates/platform-linux/src/tools/impl_.rs b/libs/cua-driver/rust/crates/platform-linux/src/tools/impl_.rs index 22da25cd29..cca9f32f80 100644 --- a/libs/cua-driver/rust/crates/platform-linux/src/tools/impl_.rs +++ b/libs/cua-driver/rust/crates/platform-linux/src/tools/impl_.rs @@ -1047,6 +1047,11 @@ impl Tool for ClickTool { let sx = args.f64_or("x", 0.0) as i32; let sy = args.f64_or("y", 0.0) as i32; let n = args.u64_or("count", 1) as usize; + // Glide the agent-cursor overlay to the click point first (the macOS + // / Windows desktop paths already do this). Without it the overlay + // sits idle elsewhere while only the real pointer warps, so a viewer + // sees the cursor "click somewhere else." + overlay_glide_to_for(&cursor_id, sx as f64, sy as f64).await; let r = tokio::task::spawn_blocking(move || { crate::input::send_click_xtest_desktop(sx, sy, button, n) })