Saving sticky notes on various window and document events.