allow mouse events being sent to parents, see #10876
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -848,8 +848,12 @@ void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd)
|
|||||||
{
|
{
|
||||||
if ( !DoHandleMouseEvent(event) )
|
if ( !DoHandleMouseEvent(event) )
|
||||||
{
|
{
|
||||||
wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
// for plain NSView mouse events would propagate to parents otherwise
|
||||||
superimpl(slf, (SEL)_cmd, event);
|
if (!m_wxPeer->MacIsUserPane())
|
||||||
|
{
|
||||||
|
wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
||||||
|
superimpl(slf, (SEL)_cmd, event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -866,8 +870,8 @@ void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
|
|||||||
{
|
{
|
||||||
if (m_lastKeyDownEvent && !DoHandleCharEvent(m_lastKeyDownEvent, text) )
|
if (m_lastKeyDownEvent && !DoHandleCharEvent(m_lastKeyDownEvent, text) )
|
||||||
{
|
{
|
||||||
wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
||||||
superimpl(slf, (SEL)_cmd, text);
|
superimpl(slf, (SEL)_cmd, text);
|
||||||
}
|
}
|
||||||
m_lastKeyDownEvent = NULL;
|
m_lastKeyDownEvent = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user