Repository navigation
Cover the taskbar icon's update-tick hook - #592
Merged
Merged
Conversation
The update tick now calls ReapplyWindowIconOnceShown every frame and the method checks whether a reapply is pending, rather than the tick checking first. The check is then reached by the tests, which brings the release's new code back over SonarCloud's coverage gate, and a test pins that nothing is reapplied when nothing is pending. The Windows-only test uses [OSCondition] (MSTEST0061).
|
This was referenced Oct 7, 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.



Written by Claude (Claude Code) on behalf of Matt Edmondson.
Why
The release run for #591 failed at SonarCloud's quality gate, so no package was published. Coverage on new code for
mainwas 78.9% against an 80% threshold, and the new-code period held only #591's lines inImGui.App/ImGuiApp.cs: 19 lines, 4 uncovered.Two of those were the update-tick hook, where the tick checked
windowIconReapplyPendingbefore callingReapplyWindowIconOnceShown. The tests drive update ticks but never with a reapply pending, so the body of thatifnever ran.Change
ReapplyWindowIconOnceShown(TryGetWindowHandle())every frame, and the method returns early unless a reapply is pending. Behavior is unchanged.ReapplyWindowIconOnceShown_NothingPending_LeavesTheIconsAlonepins that a visible window gets no new icons when nothing is pending, since the method now runs every frame.ReapplyWindowIconOnceShown_VisibleWindow_ClearsPendinguses[OSCondition(OperatingSystems.Windows)]instead of an earlyAssert.Inconclusive(MSTEST0061).The two remaining uncovered lines are the
Loadhandler setting the flag and the reapply afterShow(). Both need a real native window. That should leave the file at about 89%.Verification
ImGui.App.Tests: 474 passed, 5 skipped, 0 failed.🤖 Generated with Claude Code