This commit is contained in:
Nathan Sobo 2023-04-08 08:01:05 -06:00
parent 9d23a98157
commit 7536645eea
26 changed files with 496 additions and 519 deletions

View file

@ -92,13 +92,12 @@ impl TestAppContext {
return true;
}
if cx.window.presenter.dispatch_event(
if cx.dispatch_event(
Event::KeyDown(KeyDownEvent {
keystroke: keystroke.clone(),
is_held,
}),
false,
cx,
) {
return true;
}
@ -286,12 +285,15 @@ impl TestAppContext {
pub fn simulate_window_activation(&self, to_activate: Option<usize>) {
self.cx.borrow_mut().update(|cx| {
for window_id in cx
let other_window_ids = cx
.windows
.keys()
.filter(|window_id| Some(**window_id) != to_activate)
{
cx.window_changed_active_status(*window_id, false)
.copied()
.collect::<Vec<_>>();
for window_id in other_window_ids {
cx.window_changed_active_status(window_id, false)
}
if let Some(to_activate) = to_activate {