Skip to content

Broadcast window mode changes #2334

@kchibisov

Description

@kchibisov

When the widnow changes state, like it goes fullscreen, maximized, etc, winit should broadcast window state. I'd suggest to bundle it with resize events, and probably rename it.

pub struct WindowAttrs {
  maximized: bool,
  fullscreen: bool,
  minimized: bool,
}
enum WindowEvent {
  Configure(size: PhysicalSize<u32>, attrs: WindowAttrs)
}

This api is essential to know when the window gets fullscreened and disable things like opacity or change buttons if they're drawn by the window. Also the app could change layout in fullscreen (hide status bar, like browser).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions