Skip to content

Fix missed RedrawRequested and WindowCloseRequested events with UpdateMode::Reactive (part 2) [ADOPTED] #20624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

atlv24
Copy link
Contributor

@atlv24 atlv24 commented Aug 17, 2025

Objective

Solution

  • merge conflicts were just if let chains

Testing

  • example added by the PR works on mac

boondocklabs and others added 8 commits August 17, 2025 12:50
This fixes RequestRedraw events that can be missed in `about_to_wait()` which was reading from the cursor before `run_app_update()` is called.

This adds a subsequent read to update the redraw_requested flag if any `RequestRedraw` were sent.

Was reported in bevyengine#16817
They are now read after the world update.
Pressing the window close button when in a reactive UpdateMode
isn't handled until the reactive wait timeout is triggered or
the user triggers some other device event. This change adds an
explict check for the WindowCloseRequested event to trigger
another app update to process it.
@atlv24 atlv24 added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Needs-Testing Testing must be done before this is safe to merge labels Aug 17, 2025
@atlv24 atlv24 added this to the 0.17 milestone Aug 17, 2025
@janhohenheim
Copy link
Member

janhohenheim commented Aug 21, 2025

Using an AMD Radeon RX 7900 XTX (RADV NAVI31):

  • Win 11: works perfectly
  • Fedora 42 on Wayland: works, but uses the wrong refresh rate. My main monitor is 165 Hz, but the example seems to run at 60 Hz, which happens to be my secondary monitor's refresh rate. Note that fps_overlay uses the correct refresh rate.
  • WebGPU on Chrome: works perfectly

@gbegerow
Copy link

Not that informative, but just for conformation. Runs fine as specified on my system Win11/AMD Ryzen 7/Radeon 780M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Needs-Testing Testing must be done before this is safe to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants