Skip to content

Keep a DockedWindow registered when it is collapsed or tabbed behind another - #601

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-nq4xzr
Oct 8, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-nq4xzr

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt · project thread

Before: docking two DockedWindows into one node as tabs lost the one behind the selected tab for good, and collapsing a floating DockedWindow did the same.

After: a collapsed or tabbed-behind window stays registered and draws again as soon as it is expanded or its tab is selected. The close button and Close() still close it.

Hexa's ImWindow.DrawWindow reads any ImGui.Begin returning false as a close, but Begin also returns false for a collapsed window and for an unselected docked tab.

How: the private Adapter now overrides OnClosed(ref bool handled) and vetoes the close unless IsShown is false, which only the close button produces. Three new tests in DockedWindowTests: the tabbed and collapsed cases (both failed before the fix), and a close-button click that still closes (mutation-checked: it fails if the veto is unconditional). The full widget UI suite passes, 708 of 708.

Fixes #600

🤖 Generated with Claude Code

https://claude.ai/code/session_01GtbgtabvsqUgsTDUDD1xmb


Generated by Claude Code

…another [patch]

Hexa's ImWindow reads any ImGui.Begin returning false as a close and
unregisters the window, but Begin also returns false for a collapsed
window and for an unselected docked tab. The adapter now vetoes every
close except the close button's, which is the only path that clears
IsShown.

Fixes #600

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtbgtabvsqUgsTDUDD1xmb
@matt-edmondson matt-edmondson self-assigned this Oct 7, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DockedWindow unregisters itself when collapsed or tabbed behind another window

2 participants