|
@@ -4664,7 +4664,7 @@ static void ImGui::EndFrameDrawDimmedBackgrounds()
|
|
|
float rounding = ImMax(window->WindowRounding, g.Style.WindowRounding);
|
|
|
ImRect bb = window->Rect();
|
|
|
bb.Expand(g.FontSize);
|
|
|
- if (bb.Contains(window->Viewport->GetMainRect())) // If a window fits the entire viewport, adjust its highlight inward
|
|
|
+ if (!window->Viewport->GetMainRect().Contains(bb)) // If a window fits the entire viewport, adjust its highlight inward
|
|
|
{
|
|
|
bb.Expand(-g.FontSize - 1.0f);
|
|
|
rounding = window->WindowRounding;
|
|
@@ -4704,9 +4704,6 @@ void ImGui::EndFrame()
|
|
|
g.CurrentWindow->Active = false;
|
|
|
End();
|
|
|
|
|
|
- // Draw modal whitening background on _other_ viewports than the one the modal is one
|
|
|
- EndFrameDrawDimmedBackgrounds();
|
|
|
-
|
|
|
// Update navigation: CTRL+Tab, wrap-around requests
|
|
|
NavEndFrame();
|
|
|
|
|
@@ -4736,6 +4733,9 @@ void ImGui::EndFrame()
|
|
|
// Initiate moving window + handle left-click and right-click focus
|
|
|
UpdateMouseMovingWindowEndFrame();
|
|
|
|
|
|
+ // Draw modal/window whitening backgrounds
|
|
|
+ EndFrameDrawDimmedBackgrounds();
|
|
|
+
|
|
|
// Update user-facing viewport list (g.Viewports -> g.PlatformIO.Viewports after filtering out some)
|
|
|
UpdateViewportsEndFrame();
|
|
|
|
|
@@ -6743,20 +6743,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
window->DrawList = &window->DrawListInst;
|
|
|
}
|
|
|
|
|
|
- // Draw navigation selection/windowing rectangle border
|
|
|
- if (g.NavWindowingTargetAnim == window)
|
|
|
- {
|
|
|
- float rounding = ImMax(window->WindowRounding, g.Style.WindowRounding);
|
|
|
- ImRect bb = window->Rect();
|
|
|
- bb.Expand(g.FontSize);
|
|
|
- if (bb.Contains(viewport_rect)) // If a window fits the entire viewport, adjust its highlight inward
|
|
|
- {
|
|
|
- bb.Expand(-g.FontSize - 1.0f);
|
|
|
- rounding = window->WindowRounding;
|
|
|
- }
|
|
|
- window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, 0, 3.0f);
|
|
|
- }
|
|
|
-
|
|
|
// UPDATE RECTANGLES (2- THOSE AFFECTED BY SCROLLING)
|
|
|
|
|
|
// Work rectangle.
|