// Get the window with the focus
-NSView* GetViewFromResponder( NSResponder* responder )
+NSView* wxOSXGetViewFromResponder( NSResponder* responder )
{
NSView* view = nil;
if ( [responder isKindOfClass:[NSTextView class]] )
{
NSView* focusedView = nil;
if ( keyWindow != nil )
- focusedView = GetViewFromResponder([keyWindow firstResponder]);
+ focusedView = wxOSXGetViewFromResponder([keyWindow firstResponder]);
return focusedView;
}
wxevent.m_wheelDelta = 10;
wxevent.m_linesPerAction = 1;
+ wxevent.m_columnsPerAction = 1;
if ( fabs(deltaX) > fabs(deltaY) )
{
BOOL r = superimpl(slf, (SEL)_cmd);
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
- NSView* otherView = GetViewFromResponder(responder);
+ NSView* otherView = wxOSXGetViewFromResponder(responder);
- wxWidgetImpl* otherWindow = FindFromWXWidget(otherView);
-
- // NSScrollViews can have their subviews like NSClipView getting focus
- // therefore check and use the NSScrollView peer in that case
- if ( otherWindow == NULL && [[otherView superview] isKindOfClass:[NSScrollView class]])
- otherWindow = FindFromWXWidget([otherView superview]);
+ wxWidgetImpl* otherWindow = FindBestFromWXWidget(otherView);
// It doesn't make sense to notify about the loss of focus if it's the same
// control in the end, and just a different subview