@ -2802,11 +2802,9 @@ void ImGui::EndFrame()
// With right mouse button we close popups without changing focus
// With right mouse button we close popups without changing focus
// (The left mouse button path calls FocusWindow which will lead NewFrame->CloseInactivePopups to trigger)
// (The left mouse button path calls FocusWindow which will lead NewFrame->CloseInactivePopups to trigger)
if ( g . IO . MouseClicked [ 1 ] )
if ( g . IO . MouseClicked [ 1 ] )
{
CloseInactivePopups ( g . HoveredWindow ) ;
CloseInactivePopups ( g . HoveredWindow ) ;
}
}
}
}
}
// Sort the window list so that all child windows are after their parent
// Sort the window list so that all child windows are after their parent
// We cannot do that on FocusWindow() because childs may not exist yet
// We cannot do that on FocusWindow() because childs may not exist yet
@ -3605,8 +3603,8 @@ static void CloseInactivePopups(ImGuiWindow* ref_window)
break ;
break ;
}
}
}
}
if ( n < g . OpenPopupStack . Size ) // This test is not required but it allows to set a useful breakpoint on the line below
if ( n < g . OpenPopupStack . Size ) // This test is not required but it allows to set a convenient breakpoint on the block below
g. OpenPopupStack . resize ( n ) ;
ClosePopupToLevel ( n ) ;
}
}
static ImGuiWindow * GetFrontMostModalRootWindow ( )
static ImGuiWindow * GetFrontMostModalRootWindow ( )