ViewContext::on_window_should_close
This is a new callback that can be used to interrupt closing the window when the user has unsaved changes.
Element::dispatch_event