Add protection: activate window only if is not active.