getWindowPositionOld function

Get window position