bevyengine / bevyengine/bevy

Ui Layout not updated when the window manager changes initial window size

Open
#16,820 1 comment 0 reactions 0 assignees View on GitHub
A-UI A-Windowing C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

New to bevy, so I'm pretty much in the playing around phase. I'm using arch linux with wayland with [Sway](https://swaywm.org/) as the window manager. Sway is a [Tiling Window manager](https://en.wikipedia.org/wiki/Tiling_window_manager).

The issue is, that tiling window managers don't really respect the requested window size and just set it based on their own rules so it fits nicely on the screen.
Bevy seems to not notice this change, which means that some of my UI is off screen. Once i manually start resizing the video, the layout is properly calculated and everything is visible. When I move the screen to a different monitor / workspace and the window size gets set to a different value from sway, the layout is also correctly updated.
It's is only the initial change to the window size that seems to get lost.

## The un-updated, wrong layout
![Image](https://github.com/user-attachments/assets/fa3cf87d-a4a6-4ccd-bd5f-6dcb04526626)

## Correct, Once i resized it by a few pixels
![Image](https://github.com/user-attachments/assets/a0e1ce20-1013-400a-903a-352bb445c8e7)

## Bevy version
0.15

EDIT: Tested with both "X11" and "wayland" feature flags, as well as only one of them. Same result

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.