Sets boundaries to window size