Updated ImGui.

This commit is contained in:
Branimir Karadžić 2018-07-18 16:36:30 -07:00
parent c22661585d
commit 100170d6de
1 changed files with 7 additions and 8 deletions

View File

@ -3192,11 +3192,7 @@ static const char* GetFallbackWindowNameForWindowingList(ImGuiWindow* window)
void ImGui::NavUpdateWindowingList() void ImGui::NavUpdateWindowingList()
{ {
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;
if (!g.NavWindowingTarget) IM_ASSERT(g.NavWindowingTarget != NULL);
{
g.NavWindowingList = NULL;
return;
}
if (g.NavWindowingList == NULL) if (g.NavWindowingList == NULL)
g.NavWindowingList = FindWindowByName("###NavWindowingList"); g.NavWindowingList = FindWindowByName("###NavWindowingList");
@ -4391,14 +4387,17 @@ void ImGui::EndFrame()
g.PlatformImeLastPos = g.PlatformImePos; g.PlatformImeLastPos = g.PlatformImePos;
} }
NavUpdateWindowingList();
// Hide implicit "Debug" window if it hasn't been used // Hide implicit "Debug" window if it hasn't been used
IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls, did you forget to call end on g.CurrentWindow->Name? IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls, did you forget to call end on g.CurrentWindow->Name?
if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed) if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
g.CurrentWindow->Active = false; g.CurrentWindow->Active = false;
End(); End();
// Show CTRL+TAB list
if (g.NavWindowingTarget)
NavUpdateWindowingList();
// Initiate moving window
if (g.ActiveId == 0 && g.HoveredId == 0) if (g.ActiveId == 0 && g.HoveredId == 0)
{ {
if (!g.NavWindow || !g.NavWindow->Appearing) // Unless we just made a window/popup appear if (!g.NavWindow || !g.NavWindow->Appearing) // Unless we just made a window/popup appear
@ -4472,7 +4471,7 @@ void ImGui::Render()
g.DrawDataBuilder.Clear(); g.DrawDataBuilder.Clear();
ImGuiWindow* windows_to_render_front_most[2]; ImGuiWindow* windows_to_render_front_most[2];
windows_to_render_front_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindow : NULL; windows_to_render_front_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindow : NULL;
windows_to_render_front_most[1] = (g.NavWindowingList); windows_to_render_front_most[1] = g.NavWindowingTarget ? g.NavWindowingList : NULL;
for (int n = 0; n != g.Windows.Size; n++) for (int n = 0; n != g.Windows.Size; n++)
{ {
ImGuiWindow* window = g.Windows[n]; ImGuiWindow* window = g.Windows[n];