Implement window visible check