Only synthesize mouse moves on scene construction if window is active

This commit is contained in:
Nathan Sobo 2022-05-13 13:57:39 -06:00
parent 02e39e756b
commit a620665bed
2 changed files with 11 additions and 2 deletions

View file

@ -1005,6 +1005,13 @@ impl MutableAppContext {
.and_then(|window| window.root_view.clone().downcast::<T>())
}
pub fn window_is_active(&self, window_id: usize) -> bool {
self.cx
.windows
.get(&window_id)
.map_or(false, |window| window.is_active)
}
pub fn render_view(
&mut self,
window_id: usize,