Returns a suitable parent window, which is the last explicitly set and
still showing parent window or any of its showing parent windows, the
last focused and still showing window or any of its showing parent
windows or any other showing window - whichever is found first.