refactoring focus handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2013-06-04 07:22:54 +00:00
parent ba0cf6af6d
commit e17d84e1b2
2 changed files with 7 additions and 12 deletions

View File

@@ -183,9 +183,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
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 );
}
}
@@ -341,9 +341,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
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 );
}
}
@@ -515,9 +515,9 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
}
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 );
}
}