Broadcast window mode changes

Open
#2,334 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by reviewing the existing resize events and WindowEvent API, then compare how fullscreen, maximized, and minimized state changes are observed across supported platforms. Define how state changes should be bundled with resize events and what the public WindowAttrs representation should contain; done means applications can reliably react to these transitions.

Written by the indexing model from the issue text.

Description

C - needs discussion S - api

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).

Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-windowing/winit

All issues in rust-windowing/winit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.