Add mask when diagram window is opened