mirror of
https://github.com/librekeys/picoforge.git
synced 2026-07-28 08:01:19 -07:00
quit the application when main window is closed on macOS
This commit is contained in:
@@ -82,5 +82,12 @@ fn main() {
|
||||
Ok::<_, anyhow::Error>(())
|
||||
})
|
||||
.detach();
|
||||
|
||||
// Quit the application when the window is closed (specifically needed for macOS)
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
cx.on_window_closed(|cx| cx.quit())
|
||||
.detach();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user