Always show dialog before calling setParentWindow
Instead of having a dodgy connection that relies on timing behavior, make sure the dialog is visible. A warning is printed if it is not visible so we know there is a non working case and can fix it. BUG:450370