+// ============================================================================
+// @class WXNSPanel
+// ============================================================================
+@implementation WXNSPanel : NSPanel
+
+- (BOOL)canBecomeKeyWindow
+{
+ bool canBecome = false;
+ wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(self);
+ if(!tlw || !tlw->Cocoa_canBecomeKeyWindow(canBecome))
+ canBecome = [super canBecomeKeyWindow];
+ return canBecome;
+}