Use type_id to determine what has the focus
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
46efb844af
commit
726c8eb43f
2 changed files with 10 additions and 1 deletions
|
@ -2757,6 +2757,12 @@ impl AppContext {
|
|||
Some(self.views.get(&(window_id, view_id))?.ui_name())
|
||||
}
|
||||
|
||||
pub fn view_type_id(&self, window_id: usize, view_id: usize) -> Option<TypeId> {
|
||||
self.views
|
||||
.get(&(window_id, view_id))
|
||||
.map(|view| view.as_any().type_id())
|
||||
}
|
||||
|
||||
pub fn background(&self) -> &Arc<executor::Background> {
|
||||
&self.background
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue