From ee0cffe9bf51bb6f4421225f8908fc6391b6eb2c Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Tue, 20 Aug 2019 08:03:13 -0400 Subject: [PATCH] Handle the fact that, in OSX 10.15 (Catalina) some osx controls newly respond to the contentView selector and return nil. (#1487) This has the effect of suppressing wxEVT_PAINT events, because the rectangle in which to draw/paint is calculated incorrectly. --- src/osx/cocoa/window.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 6f570d531e..2ac29b09b5 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -3026,7 +3026,7 @@ void wxWidgetCocoaImpl::GetSize( int &width, int &height ) const void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &height ) const { - if ( [m_osxView respondsToSelector:@selector(contentView) ] ) + if ( [m_osxView respondsToSelector:@selector(contentView) ] && [m_osxView contentView] ) { NSView* cv = [m_osxView contentView];