Skip to content

Commit bf87fbc

Browse files
committed
Docking: Fixed using GetItemXXX() or IsItemXXX() functions after a DockSpace(). (#6217)
1 parent ad44f58 commit bf87fbc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Other changes:
122122

123123
Docking+Viewports Branch:
124124

125+
- Docking: Fixed using GetItemXXX() or IsItemXXX() functions after a DockSpace(). (#6217)
125126
- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
126127
- Backends: GLFW: Fixed Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
127128
- Backends: SDL3: Fixed for compilation with multi-viewports. (#6255) [@P3RK4N]

imgui.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -17494,7 +17494,13 @@ ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags
1749417494
DockNodeUpdate(node);
1749517495

1749617496
End();
17497+
17498+
ImRect bb(node->Pos, node->Pos + size);
1749717499
ItemSize(size);
17500+
ItemAdd(bb, id, NULL, ImGuiItemFlags_NoNav); // Not a nav point (could be, would need to draw the nav rect and replicate/refactor activation from BeginChild(), but seems like CTRL+Tab works better here?)
17501+
if ((g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HoveredRect) && IsWindowChildOf(g.HoveredWindow, host_window, false, true)) // To fullfill IsItemHovered(), similar to EndChild()
17502+
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
17503+
1749817504
return id;
1749917505
}
1750017506

0 commit comments

Comments
 (0)