You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for making this library. It works great on Windows 10.
I'm using the library to add file Open/Save support to a Vulkan-based renderer. PFD works well, except that the Dialog windows open up without being attached to the parent window (the renderer), so they are not modal. As you can understand, this non-standard behavior is problematic in a few ways.
I noticed there are calls to functions such as GetActiveWindow(). However, in the codebase I work on, that function returns null -- this is on Windows 10, 64bits. I made some updates to the dialog constructors to be able to pass the parent HWND to PFD, for use when creating the dialogs. This makes it so that the dialogs are created as modal, and so completely solve the issues that I was having. The downside is that my changes are only applicable to Windows.
Please find attached a patch with the changes I made in order to support this. Please consider patching the PFD code to include something that provides this kind of functionality: to be able to pass the parent HWND for the dialogs to use. Of course, you can just use the patch I'm attaching as is.
I hearby license this patched the same as PFD, with the WTFPL license.
`GetActiveWindow()` will return NULL if called asynchronously, as it's
calling thread will not have a message loop. To work around this, use
`GetForegroundWindow()` if `GetActiveWindow()` is null.
This will cause any dialogs to be modal.
Fixessamhocevar#82 and
samhocevar#93
Hello,
Thank you for making this library. It works great on Windows 10.
I'm using the library to add file Open/Save support to a Vulkan-based renderer. PFD works well, except that the Dialog windows open up without being attached to the parent window (the renderer), so they are not modal. As you can understand, this non-standard behavior is problematic in a few ways.
I noticed there are calls to functions such as
GetActiveWindow()
. However, in the codebase I work on, that function returns null -- this is on Windows 10, 64bits. I made some updates to the dialog constructors to be able to pass the parent HWND to PFD, for use when creating the dialogs. This makes it so that the dialogs are created as modal, and so completely solve the issues that I was having. The downside is that my changes are only applicable to Windows.Please find attached a patch with the changes I made in order to support this. Please consider patching the PFD code to include something that provides this kind of functionality: to be able to pass the parent HWND for the dialogs to use. Of course, you can just use the patch I'm attaching as is.
I hearby license this patched the same as PFD, with the WTFPL license.
Thanks again for the nice library.
pfd.diff.txt
The text was updated successfully, but these errors were encountered: