Making sure the window is visible and not minimized.