Tk Library Source Code

Artifact [fbb23c8d53]
Login

Artifact fbb23c8d536b73d7907de83e70ad305e6385458c:

Attachment "bwidget-backtab.patch" to ticket [765667ffff] added by jenglish 2003-07-26 03:29:42.
--- widget.tcl.backtab.old	2003-07-17 16:34:51.000000000 -0700
+++ widget.tcl	2003-07-25 13:26:35.000000000 -0700
@@ -1226,7 +1226,9 @@
 
 # -----------------------------------------------------------------------------
 #  Command Widget::focusPrev
-#  Same as tk_focusPrev, but call Widget::focusOK
+#  Same as tk_focusPrev, except:
+#	+ Don't traverse from a child to a direct ancestor
+#	+ Call Widget::focusOK instead of tk::focusOK
 # -----------------------------------------------------------------------------
 proc Widget::focusPrev { w } {
     set cur $w
@@ -1261,7 +1263,10 @@
 	    set children [winfo children $parent]
 	    set i [llength $children]
 	}
-	set cur $parent
+	if {$cur != $parent} {
+	    set cur $parent
+	    continue;
+	}
 	if {($cur == $w) || [focusOK $cur]} {
 	    return $cur
 	}