-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Fix window freezing when dragged or resized on Windows #18004
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
Fix window freezing when dragged or resized on Windows #18004
Conversation
e2713b9 to
1449687
Compare
IceSentry
left a comment
There was a problem hiding this 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.
mockersf
left a comment
There was a problem hiding this 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
|
As discussed with @alice-i-cecile it would be nice to get this fix in a patch. |
# 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
# 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
Objective
Fixes #17488
Solution
The world update logic happened in the the
about_to_waitwinit 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_motionexample continued to be animated when dragging or resizing the window.window_drag_resize.mp4