Skip to content

Commit

Permalink
Docking: Fixed a CTRL+TAB crash when aiming at an empty docked window. (
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jan 25, 2022
1 parent 3e0d6ec commit f1a0731
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Docking+Viewports Branch:
io.AddMouseViewportEvent() function, then Dear ImGui will revert to its flawed heuristic to find the viewport under.
By lowering those specs, we allow the SDL and more backend to support this, only relying on the heuristic in a few
drag and drop situations rather that relying on it everywhere.
- Docking: Fixed a CTRL+TAB crash when aiming at an empty docked window. (#4792)
- Viewports: Fixed a CTRL+TAB crash with viewports enabled when the window list needs to appears in
its own viewport (regression from 1.86). (#4023, #787)
- Viewports: Fixed active InputText() from preventing viewports to merge. (#4212)
Expand Down
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4892,6 +4892,8 @@ static void ImGui::RenderDimmedBackgroundBehindWindow(ImGuiWindow* window, ImU32
if (window->RootWindow->DockIsActive)
{
ImDrawList* draw_list = FindFrontMostVisibleChildWindow(window->RootWindowDockTree)->DrawList;
if (draw_list->CmdBuffer.Size == 0)
draw_list->AddDrawCmd();
draw_list->PushClipRect(viewport_rect.Min, viewport_rect.Max, false);
RenderRectFilledWithHole(draw_list, window->RootWindowDockTree->Rect(), window->RootWindow->Rect(), col, 0.0f);// window->RootWindowDockTree->WindowRounding);
draw_list->PopClipRect();
Expand Down

0 comments on commit f1a0731

Please sign in to comment.