Tweak ForeignWindow and demo