From: Stefan Csomor Date: Mon, 23 Aug 2004 13:59:59 +0000 (+0000) Subject: avoiding a OS-Level set focus for a control that already has the focus X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7d0cfe71cf84a7af4ea4f415964767dcb7d1dd66 avoiding a OS-Level set focus for a control that already has the focus git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 12f493093a..ba16258f53 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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