]> git.saurik.com Git - wxWidgets.git/commitdiff
only work on the focus if the control is shown
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 1 Sep 2003 13:11:59 +0000 (13:11 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 1 Sep 2003 13:11:59 +0000 (13:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp
src/mac/textctrl.cpp

index a599a624e3fbda430937b5f653489f7589d19e0d..183c86981c919257767f1213a242fde3dad3f4af 100644 (file)
@@ -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;
index a599a624e3fbda430937b5f653489f7589d19e0d..183c86981c919257767f1213a242fde3dad3f4af 100644 (file)
@@ -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;