@ -2328,29 +2328,29 @@ void ImGui::NewFrame()
g . IO . Framerate = 1.0f / ( g . FramerateSecPerFrameAccum / ( float ) IM_ARRAYSIZE ( g . FramerateSecPerFrame ) ) ;
// Handle user moving window with mouse (at the beginning of the frame to avoid input lag or sheering). Only valid for root windows.
if ( g . Mov edWindowMoveId & & g . Moved WindowMoveId = = g . ActiveId )
if ( g . Mov ingWindowMoveId & & g . Moving WindowMoveId = = g . ActiveId )
{
KeepAliveID ( g . Mov ed WindowMoveId) ;
IM_ASSERT ( g . Mov edWindow & & g . Moved Window- > RootWindow ) ;
IM_ASSERT ( g . Mov edWindow- > MoveId = = g . Moved WindowMoveId) ;
KeepAliveID ( g . Mov ing WindowMoveId) ;
IM_ASSERT ( g . Mov ingWindow & & g . Moving Window- > RootWindow ) ;
IM_ASSERT ( g . Mov ingWindow- > MoveId = = g . Moving WindowMoveId) ;
if ( g . IO . MouseDown [ 0 ] )
{
g . Mov ed Window- > RootWindow - > PosFloat + = g . IO . MouseDelta ;
g . Mov ing Window- > RootWindow - > PosFloat + = g . IO . MouseDelta ;
if ( g . IO . MouseDelta . x ! = 0.0f | | g . IO . MouseDelta . y ! = 0.0f )
MarkIniSettingsDirty ( g . Mov ed Window- > RootWindow ) ;
FocusWindow ( g . Mov ed Window) ;
MarkIniSettingsDirty ( g . Mov ing Window- > RootWindow ) ;
FocusWindow ( g . Mov ing Window) ;
}
else
{
ClearActiveID ( ) ;
g . Mov ed Window = NULL ;
g . Mov ed WindowMoveId = 0 ;
g . Mov ing Window = NULL ;
g . Mov ing WindowMoveId = 0 ;
}
}
else
{
g . Mov ed Window = NULL ;
g . Mov ed WindowMoveId = 0 ;
g . Mov ing Window = NULL ;
g . Mov ing WindowMoveId = 0 ;
}
// Delay saving settings so we don't spam disk too much
@ -2362,11 +2362,11 @@ void ImGui::NewFrame()
}
// Find the window we are hovering. Child windows can extend beyond the limit of their parent so we need to derive HoveredRootWindow from HoveredWindow
g . HoveredWindow = g . Mov edWindow ? g . Moved Window : FindHoveredWindow ( g . IO . MousePos , false ) ;
g . HoveredWindow = g . Mov ingWindow ? g . Moving Window : FindHoveredWindow ( g . IO . MousePos , false ) ;
if ( g . HoveredWindow & & ( g . HoveredWindow - > Flags & ImGuiWindowFlags_ChildWindow ) )
g . HoveredRootWindow = g . HoveredWindow - > RootWindow ;
else
g . HoveredRootWindow = g . Mov edWindow ? g . Moved Window- > RootWindow : FindHoveredWindow ( g . IO . MousePos , true ) ;
g . HoveredRootWindow = g . Mov ingWindow ? g . Moving Window- > RootWindow : FindHoveredWindow ( g . IO . MousePos , true ) ;
if ( ImGuiWindow * modal_window = GetFrontMostModalRootWindow ( ) )
{
@ -2504,7 +2504,7 @@ void ImGui::Shutdown()
g . HoveredWindow = NULL ;
g . HoveredRootWindow = NULL ;
g . ActiveIdWindow = NULL ;
g . Mov ed Window = NULL ;
g . Mov ing Window = NULL ;
for ( int i = 0 ; i < g . Settings . Size ; i + + )
ImGui : : MemFree ( g . Settings [ i ] . Name ) ;
g . Settings . clear ( ) ;
@ -2799,9 +2799,9 @@ void ImGui::EndFrame()
FocusWindow ( g . HoveredWindow ) ;
if ( ! ( g . HoveredWindow - > Flags & ImGuiWindowFlags_NoMove ) & & ! ( g . HoveredRootWindow - > Flags & ImGuiWindowFlags_NoMove ) )
{
g . Mov ed Window = g . HoveredWindow ;
g . Mov edWindowMoveId = g . Hovered Window- > MoveId ;
SetActiveID ( g . Mov ed WindowMoveId, g . HoveredRootWindow ) ;
g . Mov ing Window = g . HoveredWindow ;
g . Mov ingWindowMoveId = g . Moving Window- > MoveId ;
SetActiveID ( g . Mov ing WindowMoveId, g . HoveredRootWindow ) ;
}
}
else if ( g . NavWindow ! = NULL & & GetFrontMostModalRootWindow ( ) = = NULL )