@ -3555,6 +3555,9 @@ void ImGui::EndFrame()
return ;
IM_ASSERT ( g . FrameScopeActive & & " Forgot to call ImGui::NewFrame()? " ) ;
g . FrameScopeActive = false ;
g . FrameCountEnded = g . FrameCount ;
// Notify OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME)
if ( g . IO . ImeSetInputScreenPosFn & & ImLengthSqr ( g . PlatformImeLastPos - g . PlatformImePos ) > 0.0001f )
{
@ -3567,9 +3570,15 @@ void ImGui::EndFrame()
if ( g . CurrentWindowStack . Size ! = 1 )
{
if ( g . CurrentWindowStack . Size > 1 )
{
IM_ASSERT ( g . CurrentWindowStack . Size = = 1 & & " Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild? " ) ;
while ( g . CurrentWindowStack . Size > 1 ) // FIXME-ERRORHANDLING
End ( ) ;
}
else
{
IM_ASSERT ( g . CurrentWindowStack . Size = = 1 & & " Mismatched Begin/BeginChild vs End/EndChild calls: did you call End/EndChild too much? " ) ;
}
}
// Hide implicit/fallback "Debug" window if it hasn't been used
@ -3665,9 +3674,6 @@ void ImGui::EndFrame()
g . IO . MouseWheel = g . IO . MouseWheelH = 0.0f ;
memset ( g . IO . InputCharacters , 0 , sizeof ( g . IO . InputCharacters ) ) ;
memset ( g . IO . NavInputs , 0 , sizeof ( g . IO . NavInputs ) ) ;
g . FrameScopeActive = false ;
g . FrameCountEnded = g . FrameCount ;
}
void ImGui : : Render ( )
@ -5251,6 +5257,13 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use,
void ImGui : : End ( )
{
ImGuiContext & g = * GImGui ;
if ( g . CurrentWindowStack . Size < = 1 & & g . FrameScopeActive )
{
IM_ASSERT ( g . CurrentWindowStack . Size > 1 & & " Calling End() too many times! " ) ;
return ; // FIXME-ERRORHANDLING
}
ImGuiWindow * window = g . CurrentWindow ;
if ( window - > DC . ColumnsSet ! = NULL )