Docking: Revised undocking logic to reduce accidental whole-node undocking:

Amend bb2aa5e77.
Revert to normal threshold in StartMouseMovingWindowOrNode().
Added tooltip when hovering the collapse/window menu button.
This commit is contained in:
ocornut
2023-10-16 15:41:14 +02:00
parent 4521dec85d
commit 51d1a72e9b
4 changed files with 25 additions and 16 deletions

View File

@@ -862,7 +862,7 @@ bool ImGui::CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_no
// Switch to moving the window after mouse is moved beyond the initial drag threshold
if (IsItemActive() && IsMouseDragging(0))
StartMouseMovingWindowOrNode(window, dock_node, true);
StartMouseMovingWindowOrNode(window, dock_node, true); // Undock from window/collapse menu button
return pressed;
}