diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e56b767ca4..21055bce76 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4048,9 +4048,11 @@ WXHBRUSH wxWindowMSW::MSWGetSolidBgBrushForChild(wxWindow *child) return 0; } -wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow * WXUNUSED(child)) +wxColour wxWindowMSW::MSWGetBgColourForChild(wxWindow *child) { - return m_hasBgCol ? GetBackgroundColour() : wxNullColour; + return m_inheritBgCol || (m_hasBgCol && child == this) + ? GetBackgroundColour() + : wxNullColour; } WXHBRUSH wxWindowMSW::MSWGetBgBrushForSelf(wxWindow *parent, WXHDC hDC)