From 7d0cfe71cf84a7af4ea4f415964767dcb7d1dd66 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 23 Aug 2004 13:59:59 +0000 Subject: [PATCH] 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 --- src/mac/carbon/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.45.2