Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eframe: fix unexpected change with winit 0.28 #3382

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/eframe/src/native/epi_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ pub fn window_builder<E>(
// We must also keep the window hidden until AccessKit is initialized.
.with_visible(false);

// As of winit 0.28, with the addition of the WindowsButtons API, resizable no
// longer controls whether the maximize button is disabled. So here we emulate
// the behavior of older versions of winit until we change our API.
//
// https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md#0280
if !resizable {
window_builder =
window_builder.with_enabled_buttons(!winit::window::WindowButtons::MAXIMIZE);
}

#[cfg(target_os = "macos")]
if *fullsize_content {
window_builder = window_builder
Expand Down