egui
egui copied to clipboard
Window decorations still rendered when fullscreen set to true
Describe the bug
eframe renders window decorations when in fullscreen is true.
Workaround: set decorations = !fullscreen.
To Reproduce Steps to reproduce the behavior:
- Install eframe_template
- Implement F11 to set
fullscreentotrue(see code below) - Run app
- Press F11
- Observe window decorations rendered where the normal-sized window used to be.
Expected behavior Window decorations do not render.
Screenshots
Desktop (please complete the following information):
- OS: WSL2 in Windows 11
- Browser: N/A
- Version: N/A
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
Fullscreen implementation:
if let Some(new_fullscreen) = ctx.input(|i| {
if i.key_pressed(Key::F11) { Some(!i.viewport().fullscreen.unwrap_or(false)) }
else { None }
}) {
ctx.send_viewport_cmd(egui::ViewportCommand::Fullscreen( new_fullscreen));
}
Minor update: the workaround is not needed when building & running on Windows 11.