Add internal method to set window position