return result ;
}
-static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
WindowRef window ;
short windowPart = ::FindWindow(point, &window);
- if ( IsWindowActive(window) && windowPart == inContent )
+ // either we really are active or we are capturing mouse events
+
+ if ( (IsWindowActive(window) && windowPart == inContent) ||
+ (wxTheApp->s_captureWindow && wxTheApp->s_captureWindow->MacGetTopLevelWindow() == toplevelWindow) )
{
switch ( GetEventKind( event ) )
{
return result ;
}
-static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
WindowRef window ;
short windowPart = ::FindWindow(point, &window);
- if ( IsWindowActive(window) && windowPart == inContent )
+ // either we really are active or we are capturing mouse events
+
+ if ( (IsWindowActive(window) && windowPart == inContent) ||
+ (wxTheApp->s_captureWindow && wxTheApp->s_captureWindow->MacGetTopLevelWindow() == toplevelWindow) )
{
switch ( GetEventKind( event ) )
{