Skip to content

Commit

Permalink
Docking: Fixed moving window being interrupted when undocing a window…
Browse files Browse the repository at this point in the history
… with "io.ConfigDockingAlwaysTabBar = true". (#5324)

Regression introduced in 6b77668
  • Loading branch information
rokups authored and ocornut committed May 19, 2022
1 parent 6b5a242 commit 3605521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ Other Changes:
Docking+Viewports Branch:

- Docking: Fixed floating docked nodes not being clamped into viewport workrect to stay reachable
when g.ConfigWindowsMoveFromTitleBarOnly is set and multi-viewports are disabled. (#5044)
when io.ConfigWindowsMoveFromTitleBarOnly is true and multi-viewports are disabled. (#5044)
- Docking: Fixed a regression where moving window would be interrupted after undocking a tab
when io.ConfigDockingAlwaysTabBar is true. (#5324) [@rokups]
- Viewports: Fixed translating a host viewport from briefly altering the size of AlwaysAutoResize windows. (#5057)
- Viewports: Fixed main viewport size not matching ImDrawData::DisplaySize for one frame during resize
when multi-viewports are disabled. (#4900)
Expand Down
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3936,7 +3936,7 @@ void ImGui::UpdateMouseMovingWindowNewFrame()
ImGuiWindow* moving_window = g.MovingWindow->RootWindowDockTree;

// When a window stop being submitted while being dragged, it may will its viewport until next Begin()
const bool window_disappared = (!moving_window->WasActive || moving_window->Viewport == NULL);
const bool window_disappared = ((!moving_window->WasActive && !moving_window->Active) || moving_window->Viewport == NULL);
if (g.IO.MouseDown[0] && IsMousePosValid(&g.IO.MousePos) && !window_disappared)
{
ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
Expand Down

0 comments on commit 3605521

Please sign in to comment.