Skip to content

Commit

Permalink
Nav, Docking: Fix dimming on docked windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Dec 6, 2021
1 parent c1b70e0 commit fc198fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4828,10 +4828,6 @@ void ImGui::Render()
AddDrawListToDrawData(&viewport->DrawDataBuilder.Layers[0], GetBackgroundDrawList(viewport));
}

// Draw modal/window whitening backgrounds
if (first_render_of_frame)
RenderDimmedBackgrounds();

// Add ImDrawList to render
ImGuiWindow* windows_to_render_top_most[2];
windows_to_render_top_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindowDockTree : NULL;
Expand All @@ -4847,6 +4843,10 @@ void ImGui::Render()
if (windows_to_render_top_most[n] && IsWindowActiveAndVisible(windows_to_render_top_most[n])) // NavWindowingTarget is always temporarily displayed as the top-most window
AddRootWindowToDrawData(windows_to_render_top_most[n]);

// Draw modal/window whitening backgrounds
if (first_render_of_frame)
RenderDimmedBackgrounds();

ImVec2 mouse_cursor_offset, mouse_cursor_size, mouse_cursor_uv[4];
if (g.IO.MouseDrawCursor && g.MouseCursor != ImGuiMouseCursor_None)
g.IO.Fonts->GetMouseCursorTexData(g.MouseCursor, &mouse_cursor_offset, &mouse_cursor_size, &mouse_cursor_uv[0], &mouse_cursor_uv[2]);
Expand Down

0 comments on commit fc198fe

Please sign in to comment.