Add functions for getting window position