if ( control == 0 )
currentMouseWindow = (wxWindow*) data ;
else
+ {
currentMouseWindow = wxFindControlFromMacControl( control ) ;
+ if ( currentMouseWindow == NULL && cEvent.GetKind() == kEventMouseMoved )
+ {
+ // for wxToolBar to function we have to send certaint events to it
+ // instead of its children (wxToolBarTools)
+ ControlRef parent ;
+ GetSuperControl(control, &parent );
+ wxWindow *wxParent = wxFindControlFromMacControl( parent ) ;
+ if ( wxParent && wxParent->IsKindOf( CLASSINFO( wxToolBar ) ) )
+ currentMouseWindow = wxParent ;
+ }
+ }
}
}
(FindControlUnderMouse(windowMouseLocation , window , &dummyPart) !=
wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) )
{
- EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
- Point clickLocation = windowMouseLocation ;
-#if TARGET_API_MAC_OSX
- currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
-#endif
- HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
- modifiers , (ControlActionUPP ) -1 ) ;
+ if ( currentMouseWindow->MacIsReallyEnabled() )
+ {
+ EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
+ 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 ;
}
}
SetName(name);
m_windowId = id == -1 ? NewControlId() : id;
+ wxWindow::SetTitle( title ) ;
MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;