mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Docking: mark window payload as not cross-context.
This commit is contained in:
parent
e863f89d39
commit
66ed89b0ca
1 changed files with 3 additions and 2 deletions
|
|
@ -4455,7 +4455,7 @@ ImGuiIO& ImGui::GetIO()
|
|||
|
||||
ImGuiPlatformIO& ImGui::GetPlatformIO()
|
||||
{
|
||||
IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?");
|
||||
IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext()?");
|
||||
return GImGui->PlatformIO;
|
||||
}
|
||||
|
||||
|
|
@ -19464,7 +19464,8 @@ void ImGui::BeginDockableDragDropSource(ImGuiWindow* window)
|
|||
window = window->RootWindowDockTree;
|
||||
IM_ASSERT((window->Flags & ImGuiWindowFlags_NoDocking) == 0);
|
||||
bool is_drag_docking = (g.IO.ConfigDockingWithShift) || ImRect(0, 0, window->SizeFull.x, GetFrameHeight()).Contains(g.ActiveIdClickOffset); // FIXME-DOCKING: Need to make this stateful and explicit
|
||||
if (is_drag_docking && BeginDragDropSource(ImGuiDragDropFlags_SourceNoPreviewTooltip | ImGuiDragDropFlags_SourceNoHoldToOpenOthers | ImGuiDragDropFlags_SourceAutoExpirePayload))
|
||||
ImGuiDragDropFlags drag_drop_flags = ImGuiDragDropFlags_SourceNoPreviewTooltip | ImGuiDragDropFlags_SourceNoHoldToOpenOthers | ImGuiDragDropFlags_PayloadAutoExpire | ImGuiDragDropFlags_PayloadNoCrossContext | ImGuiDragDropFlags_PayloadNoCrossProcess;
|
||||
if (is_drag_docking && BeginDragDropSource(drag_drop_flags))
|
||||
{
|
||||
SetDragDropPayload(IMGUI_PAYLOAD_TYPE_WINDOW, &window, sizeof(window));
|
||||
EndDragDropSource();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue