You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 03612ce
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -966,6 +974,9 @@ impl ComputerUseHost for DesktopComputerUseHost {
966
974
}
967
975
#[cfg(target_os = "linux")]
968
976
{
977
+
if app.window_id.is_some(){
978
+
returnErr(OpenBitFunError::tool("[WINDOW_TARGET_UNSUPPORTED] This host uses AT-SPI app selectors and portal-selected capture, not native window IDs"));
Err(OpenBitFunError::tool("[WINDOW_DISCOVERY_UNSUPPORTED] This host exposes AT-SPI applications and portal-selected surfaces; use list_apps and get_app_state"))
// A stale/wrong-owner window request must fail without attaching the old
304
+
// window's AX or pixels, and without destroying its healthy capture.
305
+
let retained = host.control_snapshot();
306
+
let wrong_owner = tool.call_impl(&json!({"action":"get_app_state","app":{"pid":std::process::id(),"window_id":window_id}}),&context).await.unwrap_err();
if !unsafe{IsWindow(Some(hwnd))}.as_bool() || actual_pid != pid asu32{
456
-
returnErr(OpenBitFunError::tool("[TARGET_WINDOW_UNAVAILABLE] The bound window closed; select a new target explicitly"));
475
+
returnErr(OpenBitFunError::tool("[TARGET_WINDOW_UNAVAILABLE] The requested window no longer belongs to this process; refresh list_windows and select the intended window"));
returnErr("TARGET_WINDOW_CHANGED: Existing capture remains active; use the bound window or start a new control session to select another window".into());
231
-
}
232
-
Ok(())
226
+
// window. Omitted selection keeps the binding; only an explicit window ID may
227
+
// request a replacement, validated above before the old stream is released.
0 commit comments