Resolve devenv.exe for a VS major-version range via vswhere; canonical Microsoft recipe.
| 925 | FocusTargetWindowName.Reset(); |
| 926 | } |
| 927 | |
| 928 | if (!PendingFloat.WindowName.IsEmpty()) |
| 929 | { |
| 930 | ImGuiWindow* Window = ImGui::FindWindowByName(*PendingFloat.WindowName); |
| 931 | ImGuiDockNode* Root = (Window != nullptr && Window->DockNode != nullptr) ? ImGui::DockNodeGetRootNode(Window->DockNode) : nullptr; |
| 932 | if (Window == nullptr) |
| 933 | { |
| 934 | PendingFloat = {}; |
| 935 | } |
| 936 | else if (Root != nullptr && !Root->IsDockSpace()) |
| 937 | { |
| 938 | // An always-tab-bar window floats in a node of its own, and the node owns the placement. |
| 939 | ImGui::DockBuilderSetNodePos(Root->ID, ImVec2(PendingFloat.Position.x, PendingFloat.Position.y)); |
| 940 | ImGui::DockBuilderSetNodeSize(Root->ID, ImVec2(PendingFloat.Size.x, PendingFloat.Size.y)); |
| 941 | PendingFloat = {}; |
| 942 | } |
| 943 | else if (Root != nullptr && !PendingFloat.bUndockQueued) |
| 944 | { |
| 945 | // The undock lands in the next NewFrame, so the placement waits a frame for it. |
| 946 | ImGui::DockContextQueueUndockWindow(ImGui::GetCurrentContext(), Window); |
| 947 | PendingFloat.bUndockQueued = true; |
| 948 | } |
| 949 | else if (Root != nullptr) |
| 950 | { |
| 951 | PendingFloat = {}; |
| 952 | } |
| 953 | else |
| 954 | { |
| 955 | ImGui::SetWindowPos(Window, ImVec2(PendingFloat.Position.x, PendingFloat.Position.y), ImGuiCond_Always); |
| 956 | ImGui::SetWindowSize(Window, ImVec2(PendingFloat.Size.x, PendingFloat.Size.y), ImGuiCond_Always); |
| 957 | PendingFloat = {}; |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | if (bShowDearImGuiDemoWindow) |
| 962 | { |
| 963 | ImGui::ShowDemoWindow(&bShowDearImGuiDemoWindow); |
| 964 | } |
| 965 | |
| 966 | if (bShowImGuiStyleEditor) |
| 967 | { |
no test coverage detected