summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2012-01-30 19:50:29 (GMT)
committerjenglish <jenglish@flightlab.com>2012-01-30 19:50:29 (GMT)
commitc2113a36edfe45138af89b1ef62716c69494bc9f (patch)
treeca0bacc831b31e0435dfba353ef344aa3a5c14c6 /library
parentce3157c263b1c3c3346596eb5ad31d53c95ac135 (diff)
parent7a58a1661cb6a5bfae8a6e373c0a917598dad09c (diff)
downloadtk-c2113a36edfe45138af89b1ef62716c69494bc9f.zip
tk-c2113a36edfe45138af89b1ef62716c69494bc9f.tar.gz
tk-c2113a36edfe45138af89b1ef62716c69494bc9f.tar.bz2
ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561].
Diffstat (limited to 'library')
-rw-r--r--library/ttk/combobox.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index eab3e1a..03821a2 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -112,9 +112,12 @@ switch -- [tk windowingsystem] {
#
proc ttk::combobox::Press {mode w x y} {
variable State
+
+ $w instate disabled { return }
+
set State(entryPress) [expr {
- [$w instate {!readonly !disabled}]
- && [string match *textarea [$w identify $x $y]]
+ [$w instate !readonly]
+ && [string match *textarea [$w identify element $x $y]]
}]
focus $w