Updated application window detection.