diff --git a/docs/changes.txt b/docs/changes.txt index bea4984279..68ee4728ad 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -217,6 +217,10 @@ wxMotif: - don't use stipples in DoDrawText +wxUniv: + +- fixed refresh problem when message box is shown + 2.4.0 ----- diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 1fbcf71f96..032147890a 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -391,6 +391,19 @@ void wxWindow::Refresh(bool eraseBackground, const wxRect *rectClient) #endif // WXDEBUG_REFRESH wxWindowNative::Refresh(eraseBackground, &rectWin); + + // Refresh all sub controls if any. + wxWindowList::Node *node = GetChildren().GetFirst(); + while ( node ) + { + wxWindow *win = node->GetData(); + // Only refresh sub controls when it is visible + // and when it is in the update region. + if(!win->IsKindOf(CLASSINFO(wxTopLevelWindow)) && win->IsShown() && wxRegion(rectWin).Contains(win->GetRect()) != wxOutRegion) + win->Refresh(eraseBackground, &rectWin); + + node = node->GetNext(); + } } // ----------------------------------------------------------------------------