It looks like the window widget has a bit of a bug (or at least undesirable behavior) when it comes to browser resizing and centering. If you resize a browser and then show a window that was already created and was set to center, the centering will be based on the size of the browser when the window was created (even if it has never been shown).
You can work around this by calling:
$('#w').window('center');
$('#w').window('open');
But you probably want something in open() that checks for centering and recalculates it.