Skip to content

Docking in an embedded window causes sub-window to disappear and no longer be re-opened. #14

Description

@Valeour

Expected: When docking a child window into the embedded, The sub window should be tabbed.
Actual: Upon docking in the center, the sub-window disappears, and can no longer be re-opened.

I'm not versed enough in ImGui to understand why. Viewport IDs are the same, and if the initial window has IsEmbedded false, the same issue happens and both windows absorb one another, often removing the initial window entirely.

Screen.Recording.2026-06-21.232707.mp4
var app = AppBuilder.Create();

app.EnableLogging(true)
    .StyleColorsDark();

app.Build()
    .SetTitle("Example")
    .AddWindow<WindowA>()
    .Run();


public class WindowA : ImWindow
{
    private WindowB _bar;

    public WindowA()
    {
        IsEmbedded = true;

        _bar = new WindowB();
    }

    public override string Name => "Foo";

    public override void DrawContent()
    {
        if( ImGui.Button("Hello"u8) )
        {
            _bar.Show();
        }
    }
}

public class WindowB : ImWindow
{
    public WindowB()
    {
        IsEmbedded = false;
    }

    public override string Name => "Bar";

    public override void DrawContent()
    {
        ImGui.Text("World"u8);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions