From da31cbc4ef4ea342ac1cbb2339cd85074d28ff98 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 1 Sep 2003 13:11:59 +0000 Subject: [PATCH] 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 --- src/mac/carbon/textctrl.cpp | 2 +- src/mac/textctrl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.45.2