@ -5703,14 +5703,13 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Update the Appearing flag
// Update the Appearing flag
bool window_just_activated_by_user = ( window - > LastFrameActive < current_frame - 1 ) ; // Not using !WasActive because the implicit "Debug" window would always toggle off->on
bool window_just_activated_by_user = ( window - > LastFrameActive < current_frame - 1 ) ; // Not using !WasActive because the implicit "Debug" window would always toggle off->on
const bool window_just_appearing_after_hidden_for_resize = ( window - > HiddenFramesCannotSkipItems > 0 ) ;
if ( flags & ImGuiWindowFlags_Popup )
if ( flags & ImGuiWindowFlags_Popup )
{
{
ImGuiPopupData & popup_ref = g . OpenPopupStack [ g . BeginPopupStack . Size ] ;
ImGuiPopupData & popup_ref = g . OpenPopupStack [ g . BeginPopupStack . Size ] ;
window_just_activated_by_user | = ( window - > PopupId ! = popup_ref . PopupId ) ; // We recycle popups so treat window as activated if popup id changed
window_just_activated_by_user | = ( window - > PopupId ! = popup_ref . PopupId ) ; // We recycle popups so treat window as activated if popup id changed
window_just_activated_by_user | = ( window ! = popup_ref . Window ) ;
window_just_activated_by_user | = ( window ! = popup_ref . Window ) ;
}
}
window - > Appearing = ( window_just_activated_by_user | | window_just_appearing_after_hidden_for_resize ) ;
window - > Appearing = window_just_activated_by_user ;
if ( window - > Appearing )
if ( window - > Appearing )
SetWindowConditionAllowFlags ( window , ImGuiCond_Appearing , true ) ;
SetWindowConditionAllowFlags ( window , ImGuiCond_Appearing , true ) ;
@ -5967,6 +5966,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
window - > Pos = parent_window - > DC . CursorPos ;
window - > Pos = parent_window - > DC . CursorPos ;
}
}
const bool window_just_appearing_after_hidden_for_resize = ( window - > HiddenFramesCannotSkipItems > 0 ) ;
const bool window_pos_with_pivot = ( window - > SetWindowPosVal . x ! = FLT_MAX & & window - > HiddenFramesCannotSkipItems = = 0 ) ;
const bool window_pos_with_pivot = ( window - > SetWindowPosVal . x ! = FLT_MAX & & window - > HiddenFramesCannotSkipItems = = 0 ) ;
if ( window_pos_with_pivot )
if ( window_pos_with_pivot )
SetWindowPos ( window , window - > SetWindowPosVal - window - > Size * window - > SetWindowPosPivot , 0 ) ; // Position given a pivot (e.g. for centering)
SetWindowPos ( window , window - > SetWindowPosVal - window - > Size * window - > SetWindowPosPivot , 0 ) ; // Position given a pivot (e.g. for centering)