Never attach dialog to window on Windows

This commit is contained in:
Simon Gellis 2026-08-12 19:59:26 -04:00
parent e15659f6d2
commit 76b7e9d6ec
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ impl FilePicker {
}
pub fn save_file_dialog(&self) -> FileDialogBuilder {
self.new_dialog(FileDialogAction::SaveFile, true)
self.new_dialog(FileDialogAction::SaveFile, cfg!(not(target_os = "windows")))
}
fn new_dialog(&self, action: FileDialogAction, attach_window: bool) -> FileDialogBuilder {
@ -44,7 +44,7 @@ pub struct FileDialogBuilder {
dialog: rfd::AsyncFileDialog,
#[cfg(target_os = "macos")]
dialog: rfd::FileDialog,
action: FileDialogAction
action: FileDialogAction,
}
impl FileDialogBuilder {
@ -81,4 +81,4 @@ impl FileDialogBuilder {
enum FileDialogAction {
PickFile,
SaveFile,
}
}