egui icon indicating copy to clipboard operation
egui copied to clipboard

Window decorations still rendered when fullscreen set to true

Open barries opened this issue 1 year ago • 1 comments

Describe the bug eframe renders window decorations when in fullscreen is true.

Workaround: set decorations = !fullscreen.

To Reproduce Steps to reproduce the behavior:

  1. Install eframe_template
  2. Implement F11 to set fullscreen to true (see code below)
  3. Run app
  4. Press F11
  5. Observe window decorations rendered where the normal-sized window used to be.

Expected behavior Window decorations do not render.

Screenshots

image

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));
}

barries avatar Sep 24 '24 13:09 barries

Minor update: the workaround is not needed when building & running on Windows 11.

barries avatar Sep 30 '24 19:09 barries