Window enters fullscreen mode after startup system runs
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.5.0
## Operating system & version
Occurs on Windows 11, macOS High Sierra 10.13.6, Cinnamon Desktop on Arch Linux (latest version).
## What you did
- Add a _startup_ system that gets the primary window through `Res.get_primary()`.
- Position or otherwise set something based on the primary window's height or width.
- While building the App, insert a `WindowDescriptor` with the window mode set to `WindowMode::BorderlessFullscreen` or `WindowMode::Fullscreen`.
- Run the App.
## What you expected to happen
The window should enter fullscreen, and then the startup system should run using the fullscreened window's size. In the attached screenshot, the line down the center of the screen should span the full height of the image.
## What actually happened
The startup system runs, using the window's size, and _then_ the window enters fullscreen, causing things positioned based on the window size to be in the wrong position. In the attached screenshot, the line down the center of the screen does not reach the top or bottom edge.
## Additional information
I recognize that setting things statically based on window size like this isn't great practice, but since it is a small hobby project I chose to minimize complexity.
Contributor guide
Research direction
Start with the startup system using Res.get_primary() and the WindowDescriptor settings for WindowMode::BorderlessFullscreen or WindowMode::Fullscreen. Reproduce the issue on a supported platform and trace when fullscreen sizing becomes available relative to startup systems. Done means startup systems observe the fullscreen window size so size-based positioning reaches the window edges.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100