From 2c7015513fbc02d7d0e1372e37a017fb0160b6c2 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 6 Apr 2003 15:19:53 +0000 Subject: [PATCH] Applied [ 668155 ] Refresh problem when msgbox is shown (wxUniversal) Backport with modification from CVS head git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/univ/winuniv.cpp | 13 +++++++++++++ 2 files changed, 17 insertions(+) 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(); + } } // ----------------------------------------------------------------------------