|
|
@@ -7479,15 +7479,20 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
|
|
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(alpha) << IM_COL32_A_SHIFT);
|
|
|
}
|
|
|
|
|
|
- // Render, for docked windows and host windows we ensure bg goes before decorations
|
|
|
+ // Render, for docked windows and host windows we ensure BG goes before decorations
|
|
|
if (window->DockIsActive)
|
|
|
window->DockNode->LastBgColor = bg_col;
|
|
|
- ImDrawList* bg_draw_list = window->DockIsActive ? window->DockNode->HostWindow->DrawList : window->DrawList;
|
|
|
- if (window->DockIsActive || (flags & ImGuiWindowFlags_DockNodeHost))
|
|
|
- bg_draw_list->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_BG);
|
|
|
- bg_draw_list->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_RoundCornersBottom);
|
|
|
- if (window->DockIsActive || (flags & ImGuiWindowFlags_DockNodeHost))
|
|
|
- bg_draw_list->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_FG);
|
|
|
+ if (flags & ImGuiWindowFlags_DockNodeHost)
|
|
|
+ bg_col = 0;
|
|
|
+ if (bg_col & IM_COL32_A_MASK)
|
|
|
+ {
|
|
|
+ ImDrawList* bg_draw_list = window->DockIsActive ? window->DockNode->HostWindow->DrawList : window->DrawList;
|
|
|
+ if (window->DockIsActive)
|
|
|
+ bg_draw_list->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_BG);
|
|
|
+ bg_draw_list->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_RoundCornersBottom);
|
|
|
+ if (window->DockIsActive)
|
|
|
+ bg_draw_list->ChannelsSetCurrent(DOCKING_HOST_DRAW_CHANNEL_FG);
|
|
|
+ }
|
|
|
}
|
|
|
if (window->DockIsActive)
|
|
|
window->DockNode->IsBgDrawnThisFrame = true;
|