Fixed bug #2307, window.setPosition to center