Return true in the Window::on_event callback if event was handled

This commit is contained in:
Antonio Scandurra
2022-06-17 17:09:16 +02:00
parent ae2273b40a
commit 607903eed5
5 changed files with 15 additions and 9 deletions
+4 -2
View File
@@ -1774,11 +1774,13 @@ impl MutableAppContext {
presenter.borrow().dispatch_path(cx.as_ref()),
keystroke,
) {
return;
return true;
}
}
presenter.borrow_mut().dispatch_event(event, cx);
presenter.borrow_mut().dispatch_event(event, cx)
} else {
false
}
})
}));