1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Set owner of file dialogs on windows.

This commit is contained in:
Bartosz Taudul
2020-06-10 01:52:17 +02:00
parent 483bc3f549
commit d1ef8ea90b
9 changed files with 57 additions and 29 deletions
+6 -4
View File
@@ -364,7 +364,8 @@ static nfdresult_t SetDefaultPath( IFileDialog *dialog, const char *defaultPath
nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
const nfdchar_t *defaultPath,
nfdchar_t **outPath )
nfdchar_t **outPath,
void* owner )
{
HRESULT result;
nfdresult_t nfdResult = NFD_ERROR;
@@ -407,7 +408,7 @@ nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
}
// Show the dialog.
result = fileOpenDialog->Show(NULL);
result = fileOpenDialog->Show((HWND)owner);
if ( SUCCEEDED(result) )
{
// Get the file name
@@ -559,7 +560,8 @@ end:
nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
const nfdchar_t *defaultPath,
nfdchar_t **outPath )
nfdchar_t **outPath,
void* owner )
{
nfdresult_t nfdResult = NFD_ERROR;
@@ -600,7 +602,7 @@ nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
}
// Show the dialog.
result = fileSaveDialog->Show(NULL);
result = fileSaveDialog->Show((HWND)owner);
if ( SUCCEEDED(result) )
{
// Get the file name