@ -3172,7 +3172,14 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
SetActiveID ( window - > MoveId , window ) ;
g . NavDisableHighlight = true ;
g . ActiveIdClickOffset = g . IO . MousePos - window - > RootWindow - > Pos ;
if ( ! ( window - > Flags & ImGuiWindowFlags_NoMove ) & & ! ( window - > RootWindow - > Flags & ImGuiWindowFlags_NoMove ) )
bool can_move_window = true ;
if ( ( window - > Flags & ImGuiWindowFlags_NoMove ) | | ( window - > RootWindow - > Flags & ImGuiWindowFlags_NoMove ) )
can_move_window = false ;
if ( ImGuiDockNode * node = window - > DockNodeAsHost )
if ( node - > VisibleWindow & & ( node - > VisibleWindow - > Flags & ImGuiWindowFlags_NoMove ) )
can_move_window = false ;
if ( can_move_window )
g . MovingWindow = window ;
}
@ -11064,7 +11071,7 @@ static void ImGui::DockNodeStartMouseMovingWindow(ImGuiDockNode* node, ImGuiWind
IM_ASSERT ( node - > WantMouseMove = = true ) ;
ImVec2 backup_active_click_offset = g . ActiveIdClickOffset ;
StartMouseMovingWindow ( window ) ;
g . MovingWindow = window ; // If we are docked into a non moveable root wi d now, StartMouseMovingWindow() won't set g.MovingWindow. OV erride that decision.
g . MovingWindow = window ; // If we are docked into a non moveable root wi nd ow, StartMouseMovingWindow() won't set g.MovingWindow. Ov erride that decision.
node - > WantMouseMove = false ;
g . ActiveIdClickOffset = backup_active_click_offset ;
}
@ -11533,6 +11540,8 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w
if ( IsMouseClicked ( 0 ) )
{
focus_tab_id = tab_bar - > SelectedTabId ;
// Forward moving request to selected window
if ( ImGuiTabItem * tab = TabBarFindTabByID ( tab_bar , focus_tab_id ) )
StartMouseMovingWindow ( tab - > Window ) ;
}