Use cx.quit() instead of std::process::exit(0) (#47)
This commit is contained in:
parent
653222db73
commit
e4b9e008ba
2 changed files with 4 additions and 4 deletions
|
|
@ -55,6 +55,6 @@ fn main() {
|
|||
});
|
||||
}
|
||||
|
||||
fn quit(_: &Quit, _cx: &mut AppContext) {
|
||||
std::process::exit(0);
|
||||
fn quit(_: &Quit, cx: &mut AppContext) {
|
||||
cx.quit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,9 +208,9 @@ impl StoryWorkspace {
|
|||
.update(&mut cx, |_, cx| {
|
||||
cx.activate_window();
|
||||
cx.set_window_title("GPUI App");
|
||||
cx.on_release(|_, _, _cx| {
|
||||
cx.on_release(|_, _, cx| {
|
||||
// exit app
|
||||
std::process::exit(0);
|
||||
cx.quit();
|
||||
})
|
||||
.detach();
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue