|
@@ -805,7 +805,9 @@
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#include "imgui.h"
|
|
#include "imgui.h"
|
|
|
|
+#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
|
|
|
+#endif
|
|
#include "imgui_internal.h"
|
|
#include "imgui_internal.h"
|
|
|
|
|
|
#include <ctype.h> // toupper, isprint
|
|
#include <ctype.h> // toupper, isprint
|
|
@@ -3243,11 +3245,7 @@ static const char* GetFallbackWindowNameForWindowingList(ImGuiWindow* window)
|
|
void ImGui::NavUpdateWindowingList()
|
|
void ImGui::NavUpdateWindowingList()
|
|
{
|
|
{
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
- if (!g.NavWindowingTarget)
|
|
|
|
- {
|
|
|
|
- g.NavWindowingList = NULL;
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ IM_ASSERT(g.NavWindowingTarget != NULL);
|
|
|
|
|
|
if (g.NavWindowingList == NULL)
|
|
if (g.NavWindowingList == NULL)
|
|
g.NavWindowingList = FindWindowByName("###NavWindowingList");
|
|
g.NavWindowingList = FindWindowByName("###NavWindowingList");
|
|
@@ -4919,6 +4917,12 @@ void ImGui::EndFrame()
|
|
g.PlatformImePosViewport = NULL;
|
|
g.PlatformImePosViewport = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 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?
|
|
|
|
+ if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
|
|
|
|
+ g.CurrentWindow->Active = false;
|
|
|
|
+ End();
|
|
|
|
+
|
|
// Draw modal whitening background on _other_ viewports than the one the modal is one
|
|
// Draw modal whitening background on _other_ viewports than the one the modal is one
|
|
ImGuiWindow* modal_window = GetFrontMostPopupModal();
|
|
ImGuiWindow* modal_window = GetFrontMostPopupModal();
|
|
const bool dim_bg_for_modal = (modal_window != NULL);
|
|
const bool dim_bg_for_modal = (modal_window != NULL);
|
|
@@ -4938,16 +4942,13 @@ void ImGui::EndFrame()
|
|
draw_list->AddRectFilled(viewport->Pos, viewport->Pos + viewport->Size, dim_bg_col);
|
|
draw_list->AddRectFilled(viewport->Pos, viewport->Pos + viewport->Size, dim_bg_col);
|
|
}
|
|
}
|
|
|
|
|
|
- NavUpdateWindowingList();
|
|
|
|
-
|
|
|
|
- // 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?
|
|
|
|
- if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
|
|
|
|
- g.CurrentWindow->Active = false;
|
|
|
|
- End();
|
|
|
|
|
|
+ // Show CTRL+TAB list
|
|
|
|
+ if (g.NavWindowingTarget)
|
|
|
|
+ NavUpdateWindowingList();
|
|
|
|
|
|
SetCurrentViewport(NULL, NULL);
|
|
SetCurrentViewport(NULL, NULL);
|
|
|
|
|
|
|
|
+ // 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
|
|
@@ -5037,7 +5038,7 @@ void ImGui::Render()
|
|
g.Viewports[n]->DrawDataBuilder.Clear();
|
|
g.Viewports[n]->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];
|