Forcing paint after show on 10.14

layer-backed views do not get a refresh when shown, but wx-user code might depend on the assumption that they do
This commit is contained in:
Stefan Csomor
2018-11-05 14:37:54 +01:00
parent baf3dda57e
commit b77aa4782d

View File

@@ -2573,6 +2573,10 @@ bool wxWidgetCocoaImpl::IsVisible() const
void wxWidgetCocoaImpl::SetVisibility( bool visible )
{
[m_osxView setHidden:(visible ? NO:YES)];
// trigger redraw upon shown for layer-backed views
if( m_osxView.layer && !m_osxView.isHiddenOrHasHiddenAncestor )
SetNeedsDisplay(NULL);
}
double wxWidgetCocoaImpl::GetContentScaleFactor() const
@@ -3028,7 +3032,7 @@ static void SetSubviewsNeedDisplay( NSView *view )
{
for ( NSView *sub in view.subviews )
{
if ( !sub.layer )
if ( sub.isHidden || !sub.layer )
continue;
[sub setNeedsDisplay:YES];