if ( impl )
{
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
- NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+ NSView* otherView = wxOSXGetViewFromResponder(responder);
- wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+ wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
impl->DoNotifyFocusEvent( false, otherWindow );
}
}
if ( impl )
{
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
- NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+ NSView* otherView = wxOSXGetViewFromResponder(responder);
- wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+ wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
impl->DoNotifyFocusEvent( false, otherWindow );
}
}
}
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
- NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
+ NSView* otherView = wxOSXGetViewFromResponder(responder);
- wxWidgetImpl* otherWindow = impl->FindFromWXWidget(otherView);
+ wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView);
impl->DoNotifyFocusEvent( false, otherWindow );
}
}