I would leave the .icon giving its original info, as the window still has an icon, even if u cant see it right now. But i agree with the rest, that there should be methods to check the state etc.