|
|
@ -14897,12 +14897,23 @@ static bool DockNodeIsDropAllowedOne(ImGuiWindow* payload, ImGuiWindow* host_win
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Prevent docking any window created above a popup
|
|
|
|
|
|
|
|
// Technically we should support it (e.g. in the case of a long-lived modal window that had fancy docking features),
|
|
|
|
|
|
|
|
// by e.g. adding a 'if (!ImGui::IsWindowWithinBeginStackOf(host_window, popup_window))' test.
|
|
|
|
|
|
|
|
// But it would requires more work on our end because the dock host windows is technically created in NewFrame()
|
|
|
|
|
|
|
|
// and our ->ParentXXX and ->RootXXX pointers inside windows are currently mislading or lacking.
|
|
|
|
|
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
|
|
|
for (int i = g.OpenPopupStack.Size - 1; i >= 0; i--)
|
|
|
|
|
|
|
|
if (ImGuiWindow* popup_window = g.OpenPopupStack[i].Window)
|
|
|
|
|
|
|
|
if (ImGui::IsWindowWithinBeginStackOf(payload, popup_window)) // Payload is created from within a popup begin stack.
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool ImGui::DockNodeIsDropAllowed(ImGuiWindow* host_window, ImGuiWindow* root_payload)
|
|
|
|
static bool ImGui::DockNodeIsDropAllowed(ImGuiWindow* host_window, ImGuiWindow* root_payload)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (root_payload->DockNodeAsHost && root_payload->DockNodeAsHost->IsSplitNode())
|
|
|
|
if (root_payload->DockNodeAsHost && root_payload->DockNodeAsHost->IsSplitNode()) // FIXME-DOCK: Missing filtering
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
const int payload_count = root_payload->DockNodeAsHost ? root_payload->DockNodeAsHost->Windows.Size : 1;
|
|
|
|
const int payload_count = root_payload->DockNodeAsHost ? root_payload->DockNodeAsHost->Windows.Size : 1;
|
|
|
|