Skip to content

Tab Item gets mixed up with nameless widget when the window is docked #2807

@Husenap

Description

@Husenap

Branch: docking
Commit: 3233d85
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC

Hello!

I noticed multiple things that are behaving weirdly when having a widget without a name.

I would also like to know if it is considered "wrong" or "bad practice" to have a widget without a name, according to imgui?

  • The window gets undocked if you drag the widget
  • The TabItem seems to think it is the widget
  • If you click the widget the TabItem lights up, and vice versa
  • If you click and drag the TabItem, the widget will think it's being dragged.
static float f1 = 0.f;
ImGui::Begin("working_example");
ImGui::DragFloat("drag me", &f1);
ImGui::End();
static float f2 = 0.f;
ImGui::Begin("broken_example");
ImGui::DragFloat("", &f2);
ImGui::End();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions