improved window activation