Better window resizing step