Take into account window activation to set visible