Skip to content

Commit

Permalink
Docking: Fix a regression introduced in 6b77668. Drag operation would…
Browse files Browse the repository at this point in the history
… be interrupted when undocing a window with "io.ConfigDockingAlwaysTabBar = true". (ocornut#5324)
  • Loading branch information
rokups committed May 19, 2022
1 parent 6b5a242 commit 60cbed3
Showing 1 changed file with 1 addition and 1 deletion.
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 60cbed3

Please sign in to comment.