Docking: Fixed using GetItemXXX() or IsItemXXX() functions after a DockSpace(). (#6217)

features/sdl_renderer3_multiviewports
ocornut ago%!(EXTRA string=2 years)
parent ad44f5831a
commit bf87fbcbcc
  1. 1
      docs/CHANGELOG.txt
  2. 6
      imgui.cpp

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

@ -17494,7 +17494,13 @@ ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags
DockNodeUpdate(node); DockNodeUpdate(node);
End(); End();
ImRect bb(node->Pos, node->Pos + size);
ItemSize(size); ItemSize(size);
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?)
if ((g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HoveredRect) && IsWindowChildOf(g.HoveredWindow, host_window, false, true)) // To fullfill IsItemHovered(), similar to EndChild()
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
return id; return id;
} }

Loading…
Cancel
Save