Skip to content

Commit

Permalink
Keep ViewportInfo::maximized and minimized up-to-date on Windows (#…
Browse files Browse the repository at this point in the history
…3831)

This works fine on Windows.
  • Loading branch information
rustbasic authored Jan 17, 2024
1 parent 221a77d commit 7bde025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,12 +918,12 @@ pub fn update_viewport_info(
viewport_info.outer_rect = outer_rect;
viewport_info.title = Some(window.title());

if false {
if cfg!(target_os = "windows") {
// It's tempting to do this, but it leads to a deadlock on Mac when running
// `cargo run -p custom_window_frame`.
// See https://github.com/emilk/egui/issues/3494
viewport_info.maximized = Some(window.is_maximized());
viewport_info.minimized = window.is_minimized().or(viewport_info.minimized);
viewport_info.minimized = Some(window.is_minimized().unwrap_or(false));
}
}

Expand Down

0 comments on commit 7bde025

Please sign in to comment.