diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index ba3a9e70dd..4b681bcb7a 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -231,6 +231,10 @@ public : // we are doing keyboard handling in wx code, other events might be handled natively virtual bool HasUserKeyHandling() const { return m_wantsUserKey; } + // we are doing mouse handling in wx code, other events might be handled natively + // right now this is always in sync with HasUserKeyHandling + virtual bool HasUserMouseHandling() const { return m_wantsUserKey; } + wxWindowMac* GetWXPeer() const { return m_wxPeer; } bool IsOk() const { return GetWXWidget() != NULL; } diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index eba0c50235..5df461d395 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1454,7 +1454,7 @@ void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { // for plain NSView mouse events would propagate to parents otherwise // scrollwheel events have to be propagated if not handled in all cases - if (!IsUserPane() || [event type] == NSScrollWheel ) + if (!HasUserMouseHandling() || [event type] == NSScrollWheel ) { wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; superimpl(slf, (SEL)_cmd, event); @@ -3542,7 +3542,7 @@ bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask) #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10 if ( wxPlatformInfo::Get().CheckOSVersion(10, 10) ) { - if ( IsUserPane() ) + if ( HasUserMouseHandling() ) { if ( eventsMask == wxTOUCH_NONE ) {