Fix wxSplitterWindow painting on macOS 11

Fix regression in wxSplitterWindow rendering introduced in
287ee5e4c7 - the splitter wouldn't
correctly render its background under some (but not all) circumstances
on macOS 11.

Closes https://github.com/wxWidgets/wxWidgets/pull/2306

Fixes #19106
This commit is contained in:
Václav Slavík
2021-04-05 13:04:42 +02:00
committed by Vadim Zeitlin
parent 7063813b59
commit a2e4cb6cec

View File

@@ -97,13 +97,24 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;
// FIXME: with this line the background is not erased at all under GTK1,
// so temporary avoid it there
#if !defined(__WXGTK__) || defined(__WXGTK20__)
// don't erase the splitter background, it's pointless as we overwrite it
// anyhow
SetBackgroundStyle(wxBG_STYLE_PAINT);
#ifdef __WXOSX__
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16
if ( WX_IS_MACOS_AVAILABLE(10, 16) )
{
// Nothing to do: see OnPaint()
}
else
#endif
#endif
{
// FIXME: with this line the background is not erased at all under GTK1,
// so temporary avoid it there
#if !defined(__WXGTK__) || defined(__WXGTK20__)
// don't erase the splitter background, it's pointless as we overwrite it
// anyhow
SetBackgroundStyle(wxBG_STYLE_PAINT);
#endif
}
return true;
}