MOAR TESTS

This commit is contained in:
Conrad Irwin
2023-12-11 15:06:33 -07:00
parent 303189e086
commit 1e89092d62
8 changed files with 1215 additions and 1200 deletions
+6
View File
@@ -230,6 +230,12 @@ impl DispatchTree {
}
}
pub fn has_pending_keystrokes(&self) -> bool {
self.keystroke_matchers
.iter()
.any(|(_, matcher)| matcher.has_pending_keystrokes())
}
pub fn dispatch_path(&self, target: DispatchNodeId) -> SmallVec<[DispatchNodeId; 32]> {
let mut dispatch_path: SmallVec<[DispatchNodeId; 32]> = SmallVec::new();
let mut current_node_id = Some(target);
+7
View File
@@ -1451,6 +1451,13 @@ impl<'a> WindowContext<'a> {
self.dispatch_keystroke_observers(event, None);
}
pub fn has_pending_keystrokes(&self) -> bool {
self.window
.rendered_frame
.dispatch_tree
.has_pending_keystrokes()
}
fn dispatch_action_on_node(&mut self, node_id: DispatchNodeId, action: Box<dyn Action>) {
let dispatch_path = self
.window