Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libs/cua-driver-rs/crates/platform-linux/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ fn run_overlay_thread(cfg: CursorConfig, rx: std::sync::mpsc::Receiver<OverlayCo
).ok();

// Set window title (identifies our overlay, matches Windows convention).
let title = format!("TropeCUA.AgentCursorOverlay.{}", cfg.cursor_id);
// `Cua.` namespace mirrors the Windows class-name + install-path
// convention; was `TropeCUA.` (leaked codename from an early C# ref).
let title = format!("Cua.AgentCursorOverlay.{}", cfg.cursor_id);
conn.change_property8(
PropMode::REPLACE, win,
AtomEnum::WM_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fn main() {

std::thread::sleep(Duration::from_millis(1500));

// Find overlay HWND.
let class_name: Vec<u16> = OsStr::new("TropeCUA.AgentCursorOverlay\0")
// Find overlay HWND (class name matches what overlay.rs registers).
let class_name: Vec<u16> = OsStr::new("Cua.AgentCursorOverlay\0")
.encode_wide().collect();
let hwnd = unsafe { FindWindowW(
windows::core::PCWSTR(class_name.as_ptr()),
Expand Down
11 changes: 8 additions & 3 deletions libs/cua-driver-rs/crates/platform-windows/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,14 @@ fn run_overlay_thread(cfg: CursorConfig, rx: std::sync::mpsc::Receiver<OverlayCo
}
}

// Register window class.
let class_name_w: Vec<u16> = "TropeCUA.AgentCursorOverlay\0".encode_utf16().collect();
let title_w: Vec<u16> = format!("TropeCUA.AgentCursorOverlay.{}\0", cfg.cursor_id)
// Register window class. Class + title use the `Cua.` namespace
// (PascalCase Windows-class convention, matches the `Programs\Cua\`
// install-path namespace). Prior versions used `TropeCUA.` — a leaked
// codename from an early C# reference impl. The string is observable
// via Win32 EnumWindows; renaming gives users a recognisable namespace
// (and the `trycua/` org branding) instead of "what's a TropeCUA?".
let class_name_w: Vec<u16> = "Cua.AgentCursorOverlay\0".encode_utf16().collect();
let title_w: Vec<u16> = format!("Cua.AgentCursorOverlay.{}\0", cfg.cursor_id)
.encode_utf16().collect();

let hinstance = unsafe { GetModuleHandleW(PCWSTR::null()).unwrap_or_default() };
Expand Down
Loading