The old owner window is not locked by this function.
The WinQueryWindow function can be used to get the handle of the owner window.