Instead of changing window size, a browser could display site with a fixed with (e.g. 1280 pixels) centered inside a window. This way you can have your window fullscreen or any reasonable size but the site will "see" standard 1280 pixel wide screen.
Of course, 1280 pixels should not be hardcoded, there could be a choice between several popular sizes.
Of course, 1280 pixels should not be hardcoded, there could be a choice between several popular sizes.