Skip to content

Commit

Permalink
Fix : In Windows, the 'egui_demo_app' screen does not appear. (emilk#…
Browse files Browse the repository at this point in the history
…4410)

* Related emilk#4337 
* Closes emilk#4409 

Fix : In Windows, the 'egui_demo_app' screen does not appear After the
emilk#4337 update.

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
  • Loading branch information
2 people authored and hacknus committed Oct 30, 2024
1 parent e334f55 commit cf8a22e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/eframe/src/native/epi_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ pub fn viewport_builder<E>(

let mut viewport_builder = native_options.viewport.clone();

let clamp_size_to_monitor_size = viewport_builder.clamp_size_to_monitor_size.unwrap_or(
// On some Linux systems, a window size larger than the monitor causes crashes
cfg!(target_os = "linux"),
);
// On some Linux systems, a window size larger than the monitor causes crashes,
// and on Windows the window does not appear at all.
let clamp_size_to_monitor_size = viewport_builder.clamp_size_to_monitor_size.unwrap_or(true);

// Always use the default window size / position on iOS. Trying to restore the previous position
// causes the window to be shown too small.
Expand Down

0 comments on commit cf8a22e

Please sign in to comment.