fixes for mouse handling on 10.2 systems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d6fd667bc1
commit
3a9dc0619f
@ -509,7 +509,11 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
|
||||
wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) )
|
||||
{
|
||||
EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
|
||||
HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , windowMouseLocation ,
|
||||
Point clickLocation = windowMouseLocation ;
|
||||
#if TARGET_API_MAC_OSX
|
||||
currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
|
||||
#endif
|
||||
HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
|
||||
modifiers , (ControlActionUPP ) -1 ) ;
|
||||
result = noErr ;
|
||||
}
|
||||
@ -968,14 +972,14 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
||||
|
||||
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
|
||||
UMASetWTitle( (WindowRef) m_macWindow , title , m_font.GetEncoding() ) ;
|
||||
if ( m_macUsesCompositing )
|
||||
{
|
||||
::GetRootControl( (WindowRef)m_macWindow, (ControlRef*)&m_macControl ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
::CreateRootControl( (WindowRef)m_macWindow , (ControlRef*)&m_macControl ) ;
|
||||
}
|
||||
#if TARGET_API_MAC_OSX
|
||||
// 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 ,
|
||||
(ControlRef*)&m_macControl ) ;
|
||||
#else
|
||||
::CreateRootControl( (WindowRef)m_macWindow , (ControlRef*)&m_macControl ) ;
|
||||
#endif
|
||||
// the root control level handleer
|
||||
MacInstallEventHandler() ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user