Support shared-VM native windows and Page detachment
Verify Tessera GUI / verify (push) Failing after 7m35s

This commit is contained in:
2026-10-21 18:11:58 +08:00
parent f8173168fd
commit e3e46068eb
13 changed files with 993 additions and 145 deletions
+8 -5
View File
@@ -57,7 +57,7 @@ enum Query {
#[derive(Debug)]
struct Method {
owner: ObjectRef,
desktop: ObjectRef,
desktop: WeakObjectRef,
query: Query,
}
@@ -113,12 +113,15 @@ impl NativeCallable for Method {
if !mount.geometry.interactive {
return Err(VmError::InvalidArgument("Mount is not focusable"));
}
let desktop = cx
.upgrade(self.desktop)?
.ok_or(VmError::InvalidArgument("Mount window has expired"))?;
cx.set_attr(
self.desktop,
desktop,
"focus",
Value::Number((mount.geometry.id as i64).into()),
)?;
cx.set_attr(self.desktop, "focusRequested", Value::Bool(true))?;
cx.set_attr(desktop, "focusRequested", Value::Bool(true))?;
Value::Nil
}
Query::HitTest => {
@@ -292,10 +295,10 @@ impl NativeCallable for Sync {
name,
Method {
owner: object,
desktop: self.desktop,
desktop: cx.store().downgrade(self.desktop)?,
query,
},
vec![object, self.desktop],
vec![object],
))?;
cx.set_attr(object, name, Value::Object(function))?;
}