X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0092ef0d5396ecd6e41bd0ecdfe8e9fd37526449..b0b96f667dbc2fc2d3ebaa342c50bdea10f84a91:/src/cocoa/NSWindow.mm diff --git a/src/cocoa/NSWindow.mm b/src/cocoa/NSWindow.mm index efc89aca14..792f701b19 100644 --- a/src/cocoa/NSWindow.mm +++ b/src/cocoa/NSWindow.mm @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cocoa/NSWindow.mm +// Name: src/cocoa/NSWindow.mm // Purpose: wxCocoaNSWindow // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWindows license +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -193,12 +193,22 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win) { } +- (BOOL)canBecomeKeyWindow; - (BOOL)canBecomeMainWindow; @end // wxPoserNSwindow WX_IMPLEMENT_POSER(wxPoserNSWindow); @implementation wxPoserNSWindow : NSWindow +- (BOOL)canBecomeKeyWindow +{ + bool canBecome = false; + wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(self); + if(!tlw || !tlw->Cocoa_canBecomeKeyWindow(canBecome)) + canBecome = [super canBecomeKeyWindow]; + return canBecome; +} + - (BOOL)canBecomeMainWindow { bool canBecome = false; @@ -209,4 +219,3 @@ WX_IMPLEMENT_POSER(wxPoserNSWindow); } @end // implementation wxPoserNSWindow -