set window position before displaying it