Call function `setPosition()` at `api\window.cc`

fix #538