Revert "Remove maxWindow"

This reverts commit f56dc1cb169a96f9976c9daae478e9c12a864b22.
Initial maxWindow