The progress dialog parent was supposed to become the new foreground window
when the progress dialog was closed, but this didn't happen because
m_parentTop was never set when the native progress dialog implementation was
used under MSW. Fix this by explicitly calling the new SetTopParent() from its
ctor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70512
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the dialog was shown
void ReenableOtherWindows();
+ // Set the top level parent we store from the parent window provided when
+ // creating the dialog.
+ void SetTopParent(wxWindow* parent);
+
// return the top level parent window of this dialog (may be NULL)
wxWindow *GetTopParent() const { return m_parentTop; }
Create( title, message, maximum, parent, style );
}
+void wxGenericProgressDialog::SetTopParent(wxWindow* parent)
+{
+ m_parentTop = GetParentForModalDialog(parent, GetWindowStyle());
+}
+
bool wxGenericProgressDialog::Create( const wxString& title,
const wxString& message,
int maximum,
wxWindow *parent,
int style )
{
+ SetTopParent(parent);
+
m_parentTop = wxGetTopLevelParent(parent);
m_pdStyle = style;
#ifdef wxHAS_MSW_TASKDIALOG
if ( HasNativeTaskDialog() )
{
- SetParent(GetParentForModalDialog(parent, GetWindowStyle()));
+ SetTopParent(parent);
SetPDStyle(style);
SetMaximum(maximum);