When opening an open window, focus on it

This commit is contained in:
Simon Gellis 2025-03-04 20:23:45 -05:00
parent d475e806c7
commit fddc7bdd0e
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ impl Application {
fn open(&mut self, event_loop: &ActiveEventLoop, window: Box<dyn AppWindow>) {
let viewport_id = window.viewport_id();
if self.viewports.contains_key(&viewport_id) {
if let Some(viewport) = self.viewports.get(&viewport_id) {
viewport.window.focus_window();
return;
}
self.viewports.insert(