separate non-native key handling from IsUserPane
NSOpenGLView is needed under 10.14 as a native view, but it doesn’t have its own native key handling, therefore use the same code we have for non-native custom views.
This commit is contained in:
@@ -2223,7 +2223,7 @@ void wxWindowMac::MacRepositionScrollBars()
|
||||
|
||||
bool wxWindowMac::AcceptsFocus() const
|
||||
{
|
||||
if ( GetPeer() == NULL || GetPeer()->IsUserPane() )
|
||||
if ( GetPeer() == NULL || GetPeer()->HasUserKeyHandling() )
|
||||
return wxWindowBase::AcceptsFocus();
|
||||
else
|
||||
return GetPeer()->CanFocus();
|
||||
@@ -2742,10 +2742,20 @@ void wxWidgetImpl::RemoveAssociation(WXWidget control)
|
||||
wxIMPLEMENT_ABSTRACT_CLASS(wxWidgetImpl, wxObject);
|
||||
|
||||
wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane )
|
||||
{
|
||||
Init();
|
||||
m_isRootControl = isRootControl;
|
||||
m_wantsUserKey = m_isUserPane = isUserPane;
|
||||
m_wxPeer = peer;
|
||||
m_shouldSendEvents = true;
|
||||
}
|
||||
|
||||
wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane, bool wantsUserKey )
|
||||
{
|
||||
Init();
|
||||
m_isRootControl = isRootControl;
|
||||
m_isUserPane = isUserPane;
|
||||
m_wantsUserKey = wantsUserKey;
|
||||
m_wxPeer = peer;
|
||||
m_shouldSendEvents = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user