rust-windowing / rust-windowing/winit
Retrieving max window size before creation?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Tracking down a Vulkan validation error leads me to:
- depth texture size exceeds valid limit (which is screen size)
- initial (inner, physical) size comes from "find ideal size" logic, which exceeds screen size
- winit window is created at this "ideal" size, then resized down to the maximum valid size
Is it feasible to clamp the "ideal" size down to the max supported by the screen before creating the window?
Of course in theory the texture creation could be delayed until after the first resize but I don't want to do that since it's not guaranteed to happen — or is it? A quick test on X11 gives me a resize event immediately even with a smaller (valid) initial size.
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 tracing the “find ideal size” logic and the window creation/resizing path described in the report, then reproduce the behavior on X11. Check whether the requested clamp can be applied before creation and whether an initial resize event is guaranteed; done means a validated, clearly scoped resolution to the pre-creation sizing question.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100