summaryrefslogtreecommitdiffstats
path: root/library/ttk/utils.tcl
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-10-22 03:35:13 (GMT)
committerjenglish <jenglish@flightlab.com>2007-10-22 03:35:13 (GMT)
commitda9f8e86e69b0f5266067190d85b3c6bdf4fd7fa (patch)
tree301564bc68d0f6dfd5ed9d80ff06989e16c9d418 /library/ttk/utils.tcl
parent4c506d9161a0b4bb086f2b7ff405d2e76aa6ed7d (diff)
downloadtk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.zip
tk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.tar.gz
tk-da9f8e86e69b0f5266067190d85b3c6bdf4fd7fa.tar.bz2
* library/ttk/combobox.tcl: ttk::combobox overhaul;
fixes [#1814778, #1780286, #1609168, #1349586] * library/ttk/aquaTheme.tcl: Factored out aqua-specific combobox -postposition adjustments. * generic/ttk/ttkTrack.c: Detect [grab]s and unpress pressed element; combobox workaround no longer needed.
Diffstat (limited to 'library/ttk/utils.tcl')
-rw-r--r--library/ttk/utils.tcl21
1 files changed, 8 insertions, 13 deletions
diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl
index 8019303..1f21f26 100644
--- a/library/ttk/utils.tcl
+++ b/library/ttk/utils.tcl
@@ -1,5 +1,5 @@
#
-# $Id: utils.tcl,v 1.3 2006/11/27 06:53:55 jenglish Exp $
+# $Id: utils.tcl,v 1.4 2007/10/22 03:35:14 jenglish Exp $
#
# Utilities for widget implementations.
#
@@ -17,18 +17,6 @@ proc ttk::takefocus {w} {
expr {[$w instate !disabled] && [winfo viewable $w]}
}
-# ttk::traverseTo $w --
-# Set the keyboard focus to the specified window.
-#
-proc ttk::traverseTo {w} {
- set focus [focus]
- if {$focus ne ""} {
- event generate $focus <<TraverseOut>>
- }
- focus $w
- event generate $w <<TraverseIn>>
-}
-
## ttk::traverseTo $w --
# Set the keyboard focus to the specified window.
#
@@ -127,6 +115,13 @@ namespace eval ttk {
proc ttk::SaveGrab {w} {
variable Grab
+ if {[info exists Grab($w)]} {
+ # $w is already on the grab stack.
+ # This should not happen, but bail out in case it does anyway:
+ #
+ return
+ }
+
set restoreGrab [set restoreFocus ""]
set grabbed [grab current $w]