@ -2377,7 +2377,7 @@ static ImVec2 NavCalcPreferredMousePos()
return g . IO . MousePos ;
return g . IO . MousePos ;
ImVec2 p = g . NavWindow - > Pos + ImVec2 ( g . NavRefRectRel . Min . x + ImMin ( g . Style . FramePadding . x * 4 , g . NavRefRectRel . GetWidth ( ) ) , g . NavRefRectRel . Max . y - ImMin ( g . Style . FramePadding . y , g . NavRefRectRel . GetHeight ( ) ) ) ;
ImVec2 p = g . NavWindow - > Pos + ImVec2 ( g . NavRefRectRel . Min . x + ImMin ( g . Style . FramePadding . x * 4 , g . NavRefRectRel . GetWidth ( ) ) , g . NavRefRectRel . Max . y - ImMin ( g . Style . FramePadding . y , g . NavRefRectRel . GetHeight ( ) ) ) ;
ImRect r = GetVisibleRect ( ) ;
ImRect r = GetVisibleRect ( ) ;
return Im Clamp( p , r . Min , r . Max ) ;
return Im Floor( Im Clamp( p , r . Min , r . Max ) ) ; // ImFloor() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.
}
}
static int FindWindowIndex ( ImGuiWindow * window ) // FIXME-OPT O(N)
static int FindWindowIndex ( ImGuiWindow * window ) // FIXME-OPT O(N)