fix(input): unresponsive clients get uncaptured

This commit is contained in:
Nova
2025-04-07 09:16:59 -07:00
committed by Nova
parent fe9ae8225c
commit 173b033963
3 changed files with 28 additions and 4 deletions

View File

@@ -159,7 +159,15 @@ impl InputMethod {
.iter()
.filter_map(Weak::upgrade)
.collect::<Registry<InputHandler>>();
self.captures.retain(|handler| sent.contains(handler));
self.captures.retain(|handler| {
!handler
.spatial
.node()
.and_then(|n| n.get_client())
.map(|c| c.unresponsive())
.unwrap_or(false)
&& sent.contains(handler)
});
}
}
impl InputMethodAspect for InputMethod {