Resize window to recalculated value