rust-windowing / rust-windowing/winit
Need to get info about window state (maybe only on Windows)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Need to add possibility emit Maximized and Minimized window events to winit.
Current implementation on window minimizing only sends Resized event, where window size on Windows machines equals to zero (w = 0, h = 0). Sometimes it causes bugs in programs (like games), where aspect ratio dynamically calculated on window size change.
There are two suggestions to implement:
- Add completely new window events -
WindowEvent::MinimizedandWindowEvent::Maximized, as the result of window minimization don't sendWindowEvent::Resized, only that two new - Update current
WindowEvent::Resized(u32, u32)signature to a newWindowEvent::Resized(u32, u32, bool)one, whereboolparameter will be a windowminized(true)/maximized(false) state
Look at the following PR's:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the two referenced pull requests and compare their approaches to reporting minimized and maximized window state. Decide which event API and platform behavior the project should support; done means the chosen behavior is implemented consistently without causing incorrect resize-based aspect-ratio calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100