Skip to content

Conversation

@aloucks
Copy link
Contributor

@aloucks aloucks commented Feb 23, 2025

Objective

Fixes #17488

Solution

The world update logic happened in the the about_to_wait winit window callback, but this is is not correct as (1) the winit documentation states that the callback should not be used for that purpose and (2) the callback is not fired when the window is resized or being dragged. However, that callback was used in #11245 to fix an iOS bug (which caused the regression). The solution presented here is a workaround until the event loop code can be re-written.

Testing

I confirmed that the eased_motion example continued to be animated when dragging or resizing the window.

window_drag_resize.mp4

@aloucks aloucks force-pushed the issue-17488-window-freezes-on-drag-or-resize branch from e2713b9 to 1449687 Compare February 23, 2025 21:38
@IceSentry IceSentry added A-Windowing Platform-agnostic interface layer to run your app in O-Windows Specific to the Windows desktop operating system S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 23, 2025
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this works on my windows 11 machine too.

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a windows to test it works, but the fix looks like what I expected

@aevyrie aevyrie added this to the 0.15.3 milestone Feb 23, 2025
@aevyrie
Copy link
Member

aevyrie commented Feb 23, 2025

As discussed with @alice-i-cecile it would be nice to get this fix in a patch.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 23, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 23, 2025
Merged via the queue into bevyengine:main with commit 8122b35 Feb 24, 2025
33 checks passed
mockersf pushed a commit that referenced this pull request Feb 24, 2025
# Objective

Fixes #17488

## Solution

The world update logic happened in the the `about_to_wait` winit window
callback, but this is is not correct as (1) the winit documentation
states that the callback should not be used for that purpose and (2) the
callback is not fired when the window is resized or being dragged.
However, that callback was used in #11245 to fix an iOS bug (which
caused the regression). The solution presented here is a workaround
until the event loop code can be re-written.

## Testing

I confirmed that the `eased_motion` example continued to be animated
when dragging or resizing the window.


https://github.com/user-attachments/assets/ffaf0abf-4cd7-479b-83e9-e1850aaf3513
github-merge-queue bot pushed a commit that referenced this pull request Mar 2, 2025
# Objective

Fixes #18027 

## Solution

Run `redraw_requested` logic in `about_to_wait` on Windows during
initial application startup and when in headless mode

## Testing

- Ran `cargo run --example window_settings` to demonstrate invisible
window creation worked again and fixes #18027
- Ran `cargo run --example eased_motion` to demonstrate no regression
with the fix for #17488

Ran all additional `window` examples. 

Notes:

- The `transparent_window` was not transparent but this appears to have
been broken prior to #18004. See: #7544
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 O-Windows Specific to the Windows desktop operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WakeUp doesn't unfreeze systems when dragging

5 participants