From e7d27c91e6f2f75b442dd8f41c96fed021237689 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Feb 2016 13:44:29 +0100 Subject: [PATCH] Try to always give wxDirDialog a valid parent in wxMSW Use the same GetParentForModalDialog() method as for the normal dialogs to find the parent to use for this native dialog and ensure that it is shown modally even if no parent is explicitly specified when constructing it. See #17384. (this is a backport of baff0c942b23c571fdfab7fd1c1c2622ddc1c2c5 from master) --- src/msw/dirdlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index 4f2c898d8e..e5c174d4aa 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -222,7 +222,7 @@ int wxDirDialog::ShowModal() { WX_HOOK_MODAL_DIALOG(); - wxWindow* const parent = GetParent(); + wxWindow* const parent = GetParentForModalDialog(); WXHWND hWndParent = parent ? GetHwndOf(parent) : NULL; // Use IFileDialog under new enough Windows, it's more user-friendly.