X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce7fe42e848cc0c9058dae906c3a7bded50681e6..0afeb753e0a6a3fdba290bf3612bb2f012d44d95:/src/osx/cocoa/textctrl.mm?ds=sidebyside diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 6c4b6c1a88..760257f4f4 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -182,7 +182,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl ) { - impl->DoNotifyFocusEvent( false, NULL ); + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @@ -336,7 +340,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl ) { - impl->DoNotifyFocusEvent( false, NULL ); + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @@ -506,7 +514,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; timpl->SetInternalSelection(range.location, range.location + range.length); } - impl->DoNotifyFocusEvent( false, NULL ); + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @end