Skip to content

Commit

Permalink
eframe: update the maximized/minimized viewport state each frame (#3601)
Browse files Browse the repository at this point in the history
* Closes #3494

This makes sure it is always up-to-date.

Previously (years back) this caused a deadlock on Mac, but this seems to
have been fixed
  • Loading branch information
emilk authored Nov 21, 2023
1 parent 1bbd5a9 commit e037489
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,8 @@ fn update_viewport_info(viewport_info: &mut ViewportInfo, window: &Window, pixel
viewport_info.outer_rect = outer_rect;
viewport_info.fullscreen = Some(window.fullscreen().is_some());
viewport_info.focused = Some(window.has_focus());
viewport_info.minimized = window.is_minimized().or(viewport_info.minimized);
viewport_info.maximized = Some(window.is_maximized());
}

fn open_url_in_browser(_url: &str) {
Expand Down

0 comments on commit e037489

Please sign in to comment.