Open
Description
Describe the bug
When using the with_maximized(true)
option on the ViewportBuilder
, There is a small flash when the application is started. This can be sometimes very noticeable or sometimes not at all, it depends on the computer speed. This means it's not noticeable when I plug my laptop into power, somewhat noticeable when it's on battery, and very noticeable on my older laptop which is slower.
I recorded the behavior in front of a black fullscreen window at 10% speed:
Mp4 Video
maximised.mp4
To Reproduce
Steps to reproduce the behavior:
- Compile and run the following example:
#!/usr/bin/env cargo --- [dependencies] eframe = { git = "https://github.com/emilk/egui", branch = "master" } --- use eframe::{ egui::{CentralPanel, Context, ViewportBuilder}, run_native, App, Frame, NativeOptions, Result, }; struct Ui {} impl App for Ui { fn update(&mut self, ctx: &Context, _frame: &mut Frame) { let _response = CentralPanel::default().show(ctx, |_ui| {}); } } fn main() -> Result<()> { run_native( "Maximised", NativeOptions { viewport: ViewportBuilder::default().with_maximized(true), ..Default::default() }, Box::new(|_creation_context| Ok(Box::new(Ui {}))), ) }
- See window flicker on start.
Expected behavior
No flickering at the start.
Desktop (please complete the following information):
- OS: Windows 11 (Version 10.0.26100.3476)
- Browser: NA
- Version: NA