Try only setting the window on macos

This commit is contained in:
Simon Gellis 2026-08-11 23:23:22 -04:00
parent 8ed1019b44
commit a926f19f79
1 changed files with 2 additions and 0 deletions

View File

@ -19,7 +19,9 @@ impl FilePicker {
}
pub fn new_dialog(&self) -> FileDialogBuilder {
#[allow(unused_mut)]
let mut dialog = rfd::AsyncFileDialog::new();
#[cfg(target_os = "macos")]
if let Some(window) = self.window.as_ref().and_then(|w| w.upgrade()) {
dialog = dialog.set_parent(&window);
}