]> git.saurik.com Git - wxWidgets.git/commitdiff
avoiding a OS-Level set focus for a control that already has the focus
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 23 Aug 2004 13:59:59 +0000 (13:59 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 23 Aug 2004 13:59:59 +0000 (13:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 12f493093a7377f9527a0c6ac8275e1b431b4fb3..ba16258f5366dd2a637565d34efe79efa8a1a465 100644 (file)
@@ -988,9 +988,11 @@ void wxWindowMac::SetFocus()
 {
     if ( AcceptsFocus() )
     {
-#if !TARGET_API_MAC_OSX
+
         wxWindow* former = FindFocus() ;
-#endif
+        if ( former == this )
+            return ;
+
         OSStatus err = m_peer->SetFocus( kControlFocusNextPart ) ;
         // as we cannot rely on the control features to find out whether we are in full keyboard mode, we can only
         // leave in case of an error