programmatically resize / reposition vaadin window

We have a Vaadin 7 application which can have several Vaadin Window objects. To aid the user in managing these windows, I want to have a button which will resize/reposition the windows such as tile the windows. The code I have goes something like this:

for (Window window : ui.getWindows()) {
  window.setHeight(...);
  window.setWidth(...);
  window.setPositionX(...);
  window.setPositionY(....);
}

The windows are added to the UI, user interacts with them, presses the button which runs the above pseudo code, and the windows respond. Good so far. But if the user now manually moves/resizes the windows again, the same button has no effect.

Does anyone know why the second button push would have no effect? It seems like a bug, but maybe I have some basic misunderstanding?

Any info is much appreciated.