attempt to get the 'new focus' window parameter of a focus kill event set correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1347,10 +1347,10 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_cmd)
|
||||
{
|
||||
wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
|
||||
BOOL r = superimpl(slf, (SEL)_cmd);
|
||||
// get the current focus after running resignFirstResponder
|
||||
// note that this value isn't reliable, it might return the same view that
|
||||
// is resigning
|
||||
NSView* otherView = FindFocus();
|
||||
|
||||
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
|
||||
NSView* otherView = [responder isKindOfClass:[NSView class]] ? (NSView*)responder : nil;
|
||||
|
||||
wxWidgetImpl* otherWindow = FindFromWXWidget(otherView);
|
||||
|
||||
// CS: the fix for #12267 leads to missed focus events like in #14938 , as #12267 doesn't seem to happen anymore even
|
||||
|
||||
Reference in New Issue
Block a user