rust-windowing / rust-windowing/softbuffer
Initial Window Size
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 506
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Currently the initial window size is always 0 in width and height, this will lead to panics when calling buffer_mut() if the size wasn't set with resize() depending on the platform:
- Wayland: panics.
- MacOS: doesn't panic.
- Redox: doesn't panic.
- Web: doesn't panic, but will panic when calling
present()orfetch()(#104). - Windows: panics.
- X11: doesn't panic.
I would prefer if we make this consistent on all platforms. My current ideas:
- Require an initial size in
Surface::new(). - Set the initial size to the window size (don't know if that's possible on all platforms).
- Introduce a new error variant instead of panicking.
Currently leaning towards idea 1.
Contributor guide
No contributing guide indexed for this repository
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 Surface::new, buffer_mut(), resize(), present(), and fetch() across the Wayland, macOS, Redox, Web, Windows, and X11 backends. Review issue #104 and compare the platform-specific behavior before choosing a consistent initial-size policy; done means the behavior is consistent and no size-dependent panic remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100