Checking for window to be done before showing it.