only using std::max for window.