make window dismissable