Repository navigation
Keep the frame callback when a minimized window gets SIZE_MINIMIZED again - #24
Merged
kaylafortin merged 2 commits intoNov 10, 2026
Merged
Conversation
…ZE_MINIMIZED again `WM_SIZE(SIZE_MINIMIZED)` moved the frame callback into `restore_from_minimized` without checking whether it was still there. A second `SIZE_MINIMIZED` before the window was restored took the already empty `request_frame` slot and stored `None` over the parked callback. The restore then had nothing to put back, so every later `WM_PAINT` returned before drawing: the window kept its last frame for good while input, cursor changes and native dialogs still worked. Only a restart recovered it. Park the callback only when there is one to park (HUB-8707). `platform::tests::a_window_minimized_twice_still_draws_after_restore` fails without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kaylafortin
marked this pull request as ready for review
November 6, 2026 20:12
…ty/HUB-8707-keep-frame-callback
Author
|
/harness-review |
chris-addison
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, a minimized window that receives
WM_SIZE(SIZE_MINIMIZED)a second time before it is restored never draws again. It keeps its last frame on screen, while input, cursor changes and native dialogs still work. Only a restart recovers it. Investigated for the native Unity Hub (HUB-8707, a Hub 4.0 beta report of a window that stopped updating after being open all day).SIZE_MINIMIZEDbranch ofhandle_size_msgmovedrequest_frameintorestore_from_minimizedunconditionally. On a secondSIZE_MINIMIZED,request_framewas already empty, soNoneoverwrote the parked callback. The restore had nothing to put back, anddraw_windowreturned early on every laterWM_PAINT.Upstream gpui-ce
mainhas the same code.What is and isn't proven
SIZE_MINIMIZEDsent to the minimized window left it frozen after restore: the app state navigated, the screen did not. With this fix the same steps repaint.ShowWindowhide/show sequences on a minimized window. The fix is a no-op when the message does not repeat.Testing
platform::tests::a_window_minimized_twice_still_draws_after_restoreopens a real window with a counting frame callback, minimizes it, sends a secondWM_SIZE(SIZE_MINIMIZED), restores it, forces a paint, and checks that the callback ran. Run on a Windows desktop session:gpui_ce_windowslib suite passes (25 tests,test-support,render-to-image).Like the other window tests it needs a desktop session.
cargo clippy -p gpui_ce_windows --all-targetsreports nothing in the changed files; its existing findings (gpui_render/build.rs,directx_renderer.rs,direct_write.rs) are already onunity/hub-consolidated.For Hub 4.0,
unity/HUB-8707-keep-frame-callback-v4.0.0carries the same commit on top ofc25e0ae90c, therelease/v4.0.0pin.🤖 Generated with Claude Code