Get compiling

This commit is contained in:
Nathan Sobo
2023-08-07 19:08:58 -06:00
parent 3e0d0e5c01
commit 486f5bc6ca
14 changed files with 97 additions and 107 deletions
+7
View File
@@ -23,6 +23,7 @@ use std::{
};
use anyhow::{anyhow, Context, Result};
use derive_more::Deref;
use parking_lot::Mutex;
use postage::oneshot;
@@ -4127,6 +4128,12 @@ impl<T: View> ViewHandle<T> {
self.window_id
}
pub fn window<C: BorrowWindowContext>(&self, cx: &C) -> C::Result<AnyWindowHandle> {
cx.read_window(self.window_id, |cx| {
AnyWindowHandle::new(self.window_id, cx.window.root_view.type_id())
})
}
pub fn id(&self) -> usize {
self.view_id
}
+1 -1
View File
@@ -175,7 +175,7 @@ impl BorrowWindowContext for WindowContext<'_> {
where
F: FnOnce(&mut WindowContext) -> Option<T>,
{
BorrowWindowContext::update_window_optional(self, window_id, f)
BorrowWindowContext::update_window(self, window_id, f)
}
}