Repository navigation
fix(tao): repaint satellites Win32 re-shows on their owner's restore - #895
Merged
Merged
Conversation
Minimizing a window hides the windows it owns (satellites, dialogs) and restoring it shows them again through WM_SHOWWINDOW/SW_PARENTOPENING, without TaoWindow.show ever running. DWM has dropped the hidden window's frame and the scene is clean, so nothing was presented: the satellite stayed white until the pointer passed over it. The deco WndProc arms on SW_PARENTOPENING and, once the window is really mapped (WM_WINDOWPOSCHANGED with SWP_SHOWWINDOW), calls back into the scene host, which forces its next present. Calling back from WM_SHOWWINDOW itself is too early: the window is still hidden and DWM drops that present too.
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.
Summary
On Windows, if a satellite is torn off and the main window is then minimized and restored, the satellite comes back all white until the pointer passes over it.
WM_SHOWWINDOW/SW_PARENTOPENING, withoutTaoWindow.show()ever running. As a result,showHooknever armsforcePresentOnce. DWM has dropped the hidden window's frame and the scene is clean, so no present happens.SW_PARENTOPENING. Once the window is really mapped (WM_WINDOWPOSCHANGED+SWP_SHOWWINDOW), it callsNativeTaoWindowsDecoBridge.onShownWithOwner, and the scene host then forces its next present. Calling back fromWM_SHOWWINDOWitself is too early: the window is still hidden and DWM drops that present too (measured: still white).onShownWithOwneris declared in the reachability metadata, so the upcall survives native image.Test plan
windows a satellite is painted after its parent is restored(SatelliteRestorePaintHeadfulCases): 3 minimize/restore rounds, reading the satellite back throughPrintWindow(DWM's copy) without moving the pointer#FFFFFFFF, 0% of the content visiblektlintCheck+detektclean