Store AnyWindowHandles instead of usizes

This commit is contained in:
Nathan Sobo 2023-08-08 16:06:53 -06:00
parent 1e8a9ccdb5
commit afd89b256a
9 changed files with 117 additions and 134 deletions

View file

@ -23,7 +23,7 @@ impl WindowInputHandler {
let mut app = self.app.try_borrow_mut().ok()?;
self.window.update_optional(&mut *app, |cx| {
let view_id = cx.window.focused_view_id?;
let view = cx.views.get(&(self.window.id(), view_id))?;
let view = cx.views.get(&(self.window, view_id))?;
let result = f(view.as_ref(), &cx);
Some(result)
})