add changeWindowSizeOnTheFly snippet