Skip to content

Commit

Permalink
use our own spawn util func
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Dec 14, 2023
1 parent 95c40e8 commit c4b4d16
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,15 @@ mod imp {

let prev_document = obj.document();
if prev_document.is_modified() {
glib::spawn_future_local(clone!(@weak obj => async move {
if obj.handle_unsaved_changes(&prev_document).await.is_err() {
return;
}
obj.destroy();
}));
utils::spawn(
glib::Priority::default(),
clone!(@weak obj => async move {
if obj.handle_unsaved_changes(&prev_document).await.is_err() {
return;
}
obj.destroy();
}),
);
return glib::Propagation::Stop;
}

Expand Down

0 comments on commit c4b4d16

Please sign in to comment.