X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90ff87d7b01e32cbfa856b41e11b646316c2e88a..be346c263f862da8b73f498b607d583b092c9029:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 882781e732..896ede9fdb 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -337,7 +337,8 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) break ; } break ; - case kEventMouseWheelMoved : + case kEventMouseWheelMoved : + { wxevent.SetEventType(wxEVT_MOUSEWHEEL ) ; // EventMouseWheelAxis axis = cEvent.GetParameter(kEventParamMouseWheelAxis, typeMouseWheelAxis) ; @@ -347,6 +348,7 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) wxevent.m_wheelDelta = 1; wxevent.m_linesPerAction = 1; break ; + } default : wxevent.SetEventType(wxEVT_MOTION ) ; break ; @@ -1000,17 +1002,17 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, // There is a bug in 10.2.X for ::GetRootControl returning the window view instead of // the content view, so we have to retrieve it explicitely HIViewFindByID( HIViewGetRoot( (WindowRef) m_macWindow ) , kHIViewWindowContentID , - *m_peer ) ; + m_peer->GetControlRefAddr() ) ; if ( !m_peer->Ok() ) { // compatibility mode fallback - GetRootControl( (WindowRef) m_macWindow , *m_peer ) ; + GetRootControl( (WindowRef) m_macWindow , m_peer->GetControlRefAddr() ) ; } #else - ::CreateRootControl( (WindowRef)m_macWindow , *m_peer ) ; + ::CreateRootControl( (WindowRef)m_macWindow , m_peer->GetControlRefAddr() ) ; #endif // the root control level handleer - MacInstallEventHandler() ; + MacInstallEventHandler( (WXWidget) m_peer->GetControlRef() ) ; // the frame window event handler InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;