Add Context::read_window, WindowHandle::root, and change ViewContext.view() to return a reference

This commit is contained in:
Mikayla 2023-11-08 22:11:19 -08:00
parent ad3b0bd227
commit 7a7ef1025d
No known key found for this signature in database
7 changed files with 103 additions and 6 deletions

View file

@ -45,7 +45,7 @@ impl<V: 'static> ElementInputHandler<V> {
/// containing view.
pub fn new(element_bounds: Bounds<Pixels>, cx: &mut ViewContext<V>) -> Self {
ElementInputHandler {
view: cx.view(),
view: cx.view().clone(),
element_bounds,
cx: cx.to_async(),
}