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
Both the file dialog and the message dialogs use GetActiveWindow to parent the dialogs to the calling window. However, according to https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getactivewindow, this function only returns the active window for the calling thread, and as the use of these Windows APIs are in the asynchronous executor, GetActiveWindow always returns NULL.
I've implemented and tested a fix for this, which can be found in the uploaded file (extension renamed so that I could upload it). portable-file-dialogs.txt
The text was updated successfully, but these errors were encountered:
samangh
added a commit
to samangh/portable-file-dialogs
that referenced
this issue
Mar 12, 2024
`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
Both the file dialog and the message dialogs use
GetActiveWindow
to parent the dialogs to the calling window. However, according to https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getactivewindow, this function only returns the active window for the calling thread, and as the use of these Windows APIs are in the asynchronousexecutor
,GetActiveWindow
always returns NULL.I've implemented and tested a fix for this, which can be found in the uploaded file (extension renamed so that I could upload it).
portable-file-dialogs.txt
The text was updated successfully, but these errors were encountered: