Nav, Drag and Drop, Docking: fixed two issues leading nav result to conflict with moving a window. (#4211, #3025)

This commit is contained in:
ocornut
2021-06-09 19:15:56 +02:00
parent 4161a67b38
commit db0338a1f2
3 changed files with 19 additions and 6 deletions

View File

@ -7987,11 +7987,13 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
if (undocking_tab)
{
// Undock
// FIXME: refactor to share more code with e.g. StartMouseMovingWindow
DockContextQueueUndockWindow(&g, docked_window);
g.MovingWindow = docked_window;
SetActiveID(g.MovingWindow->MoveId, g.MovingWindow);
g.ActiveIdClickOffset -= g.MovingWindow->Pos - bb.Min;
g.ActiveIdNoClearOnFocusLoss = true;
SetActiveIdUsingNavAndKeys();
}
}
}