From 8d1c264801d9b0f04d3424b3733ae0d833412064 Mon Sep 17 00:00:00 2001 From: Michael Martz Date: Mon, 25 Jul 2022 11:23:11 -0700 Subject: [PATCH] Fix modal disable behavior on Win32 --- src/nfd_win.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nfd_win.cpp b/src/nfd_win.cpp index 1a4ad2a..76f0ba0 100644 --- a/src/nfd_win.cpp +++ b/src/nfd_win.cpp @@ -444,7 +444,7 @@ NFD_OpenDialog(const nfdchar_t* filterList, const nfdchar_t* defaultPath, nfdcha SetDefaultFile(fileOpenDialog, defaultPath); // Show the dialog. - result = fileOpenDialog->Show(NULL); + result = fileOpenDialog->Show(::GetActiveWindow()); if (SUCCEEDED(result)) { // Get the file name ::IShellItem* shellItem(NULL); @@ -542,7 +542,7 @@ NFD_OpenDialogMultiple(const nfdchar_t* filterList, } // Show the dialog. - result = fileOpenDialog->Show(NULL); + result = fileOpenDialog->Show(::GetActiveWindow()); if (SUCCEEDED(result)) { IShellItemArray* shellItems; result = fileOpenDialog->GetResults(&shellItems); @@ -613,7 +613,7 @@ NFD_SaveDialog(const nfdchar_t* filterList, const nfdchar_t* defaultPath, nfdcha SetDefaultFile(fileSaveDialog, defaultPath); // Show the dialog. - result = fileSaveDialog->Show(NULL); + result = fileSaveDialog->Show(::GetActiveWindow()); if (SUCCEEDED(result)) { // Get the file name ::IShellItem* shellItem; @@ -698,7 +698,7 @@ NFD_PickFolder(const nfdchar_t* defaultPath, nfdchar_t** outPath) } // Show the dialog to the user - result = fileDialog->Show(NULL); + result = fileDialog->Show(::GetActiveWindow()); if (SUCCEEDED(result)) { // Get the folder name ::IShellItem* shellItem(NULL);