allowing reentrancy on NSPanels makeResponder as in NSWindow, see #14269

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2014-05-18 13:59:09 +00:00
parent e65104f198
commit 3ba1c7e166

View File

@ -296,9 +296,13 @@ static NSResponder* s_formerFirstResponder = NULL;
- (BOOL)makeFirstResponder:(NSResponder *)aResponder
{
NSResponder* tempFormer = s_formerFirstResponder;
NSResponder* tempNext = s_nextFirstResponder;
s_nextFirstResponder = aResponder;
s_formerFirstResponder = [[NSApp keyWindow] firstResponder];
BOOL retval = [super makeFirstResponder:aResponder];
s_nextFirstResponder = nil;
s_nextFirstResponder = tempNext;
s_formerFirstResponder = tempFormer;
return retval;
}