Skip to content

Window resizing glitches on MacOS #15004

@UkoeHB

Description

@UkoeHB

Bevy version

v0.14.1

[Optional] Relevant system information

MacOS 12.5.1 MacBook Pro

What you did

cargo run --example ui then resized the window.

What went wrong

  • When resizing a window, there is a 'banding' effect on the top and right side of the screen where the app is not rendered. This is a regression from v0.13.0, where the banding effect is on the bottom and right side. Banding at the top causes a lot of glitchiness when the rendered panel reverts itself.
  • If using desktop_app() window mode, the window does not update immediately after a resize despite receiving a resize event (presumably).

Additional information

I bisected the problem to the PR introducing winit v0.30. It has persisted until now despite #14609 claiming to fix it. See #14255 as a duplicate issue that was closed.

Attached is a video of the problem, showcasing both the top/right banding and the delay (this is cargo run --example ui_wrap_debug, which uses desktop_app() window mode):

bevy_ui_resize_bug_08_31_24.mp4

There is currently an open wgpu PR that fixes part of the problem. However, it doesn't explain the regression from bottom/right banding to top/right banding. I ran the hello_triangle example on wgpu v0.19.3 and got bottom/right banding as expected.

One thing I noticed is we are not calling request_redraw() on the winit window when WindowEvent::Resized is received, even though winit says you need to do so. Unfortunately, adding it manually did not seem to help much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions