]> git.saurik.com Git - wxWidgets.git/commitdiff
implementing canBecomeKeyView for user panes, native focus support, fixes #15070
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 6 Mar 2013 21:00:38 +0000 (21:00 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 6 Mar 2013 21:00:38 +0000 (21:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index dfb8035dac6933364cb7cb92b76d68a95e05b28c..305546fbb2412b9965c0fc681c6f03c51e1b0b0d 100644 (file)
@@ -809,6 +809,14 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve
 }
 #endif
 
+- (BOOL) canBecomeKeyView
+{
+    wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
+    if ( viewimpl && viewimpl->GetWXPeer() )
+        return viewimpl->GetWXPeer()->AcceptsFocus();
+    return NO;
+}
+
 @end // wxNSView
 
 //