From: Stefan Csomor Date: Mon, 1 Sep 2003 13:11:59 +0000 (+0000) Subject: only work on the focus if the control is shown X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/da31cbc4ef4ea342ac1cbb2339cd85074d28ff98 only work on the focus if the control is shown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index a599a624e3..183c86981c 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -426,7 +426,7 @@ static pascal ControlPartCode TPPaneFocusProc(ControlHandle theControl, ControlF /* set up locals */ focusResult = kControlFocusNoPart; tpvars = (STPTextPaneVars **) GetControlReference(theControl); - if (tpvars != NULL) { + if (tpvars != NULL && IsControlVisible( theControl ) ) { state = HGetState((Handle) tpvars); HLock((Handle) tpvars); varsp = *tpvars; diff --git a/src/mac/textctrl.cpp b/src/mac/textctrl.cpp index a599a624e3..183c86981c 100644 --- a/src/mac/textctrl.cpp +++ b/src/mac/textctrl.cpp @@ -426,7 +426,7 @@ static pascal ControlPartCode TPPaneFocusProc(ControlHandle theControl, ControlF /* set up locals */ focusResult = kControlFocusNoPart; tpvars = (STPTextPaneVars **) GetControlReference(theControl); - if (tpvars != NULL) { + if (tpvars != NULL && IsControlVisible( theControl ) ) { state = HGetState((Handle) tpvars); HLock((Handle) tpvars); varsp = *tpvars;