using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in cocoa disabling/enabling child windows, fixes #16232, fixes #15495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c13a63a26a
commit
91f25e0bbd
@ -264,6 +264,7 @@ public :
|
||||
void RestoreWindowLevel();
|
||||
|
||||
static WX_NSResponder GetNextFirstResponder() ;
|
||||
static WX_NSResponder GetFormerFirstResponder() ;
|
||||
protected :
|
||||
CGWindowLevel m_macWindowLevel;
|
||||
WXWindow m_macWindow;
|
||||
|
@ -158,6 +158,7 @@ static bool IsUsingFullScreenApi(WXWindow macWindow)
|
||||
//
|
||||
|
||||
static NSResponder* s_nextFirstResponder = NULL;
|
||||
static NSResponder* s_formerFirstResponder = NULL;
|
||||
|
||||
@interface wxNSWindow : NSWindow
|
||||
{
|
||||
@ -223,9 +224,13 @@ static NSResponder* s_nextFirstResponder = 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;
|
||||
}
|
||||
|
||||
@ -1122,6 +1127,10 @@ WX_NSResponder wxNonOwnedWindowCocoaImpl::GetNextFirstResponder()
|
||||
return s_nextFirstResponder;
|
||||
}
|
||||
|
||||
WX_NSResponder wxNonOwnedWindowCocoaImpl::GetFormerFirstResponder()
|
||||
{
|
||||
return s_formerFirstResponder;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user