@ -7445,6 +7445,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
if ( window - > AutoFitFramesY > 0 )
if ( window - > AutoFitFramesY > 0 )
window - > AutoFitFramesY - - ;
window - > AutoFitFramesY - - ;
// Clear SetNextWindowXXX data (can aim to move this higher in the function)
g . NextWindowData . ClearFlags ( ) ;
// Apply focus (we need to call FocusWindow() AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there)
// Apply focus (we need to call FocusWindow() AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there)
// We ImGuiFocusRequestFlags_UnlessBelowModal to:
// We ImGuiFocusRequestFlags_UnlessBelowModal to:
// - Avoid focusing a window that is created outside of a modal. This will prevent active modal from being closed.
// - Avoid focusing a window that is created outside of a modal. This will prevent active modal from being closed.
@ -7517,6 +7520,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Append
// Append
SetCurrentViewport ( window , window - > Viewport ) ;
SetCurrentViewport ( window , window - > Viewport ) ;
SetCurrentWindow ( window ) ;
SetCurrentWindow ( window ) ;
g . NextWindowData . ClearFlags ( ) ;
}
}
if ( ! ( flags & ImGuiWindowFlags_DockNodeHost ) )
if ( ! ( flags & ImGuiWindowFlags_DockNodeHost ) )
@ -7525,7 +7529,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Clear 'accessed' flag last thing (After PushClipRect which will set the flag. We want the flag to stay false when the default "Debug" window is unused)
// Clear 'accessed' flag last thing (After PushClipRect which will set the flag. We want the flag to stay false when the default "Debug" window is unused)
window - > WriteAccessed = false ;
window - > WriteAccessed = false ;
window - > BeginCount + + ;
window - > BeginCount + + ;
g . NextWindowData . ClearFlags ( ) ;
// Update visibility
// Update visibility
if ( first_begin_of_the_frame )
if ( first_begin_of_the_frame )
@ -19143,6 +19146,7 @@ void ImGui::BeginDockableDragDropSource(ImGuiWindow* window)
// When ConfigDockingWithShift is set, display a tooltip to increase UI affordance.
// When ConfigDockingWithShift is set, display a tooltip to increase UI affordance.
// We cannot set for HoveredWindowUnderMovingWindow != NULL here, as it is only valid/useful when drag and drop is already active
// We cannot set for HoveredWindowUnderMovingWindow != NULL here, as it is only valid/useful when drag and drop is already active
// (because of the 'is_mouse_dragging_with_an_expected_destination' logic in UpdateViewportsNewFrame() function)
// (because of the 'is_mouse_dragging_with_an_expected_destination' logic in UpdateViewportsNewFrame() function)
IM_ASSERT ( g . NextWindowData . Flags = = 0 ) ;
if ( g . IO . ConfigDockingWithShift & & g . MouseStationaryTimer > = 1.0f & & g . ActiveId > = 1.0f )
if ( g . IO . ConfigDockingWithShift & & g . MouseStationaryTimer > = 1.0f & & g . ActiveId > = 1.0f )
SetTooltip ( " %s " , LocalizeGetMsg ( ImGuiLocKey_DockingHoldShiftToDock ) ) ;
SetTooltip ( " %s " , LocalizeGetMsg ( ImGuiLocKey_DockingHoldShiftToDock ) ) ;
return ;
return ;