bevyengine / bevyengine/bevy

Window enters fullscreen mode after startup system runs

Open
#3,275 3 comments 0 reactions 0 assignees View on GitHub
A-Windowing C-Bug S-Needs-Investigation
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.

Screen Shot 2021-12-07 at 1 11 02 PM

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.