summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@noemail.net>2011-03-19 02:00:40 (GMT)
committerpatthoyts <patthoyts@noemail.net>2011-03-19 02:00:40 (GMT)
commit6bc69f25be173b45433fedf824047a8900f80183 (patch)
tree79c19473af43ce7fc7b827964122072262185961 /library/ttk
parentb6144dc732e01147645205d69851a8ef54071252 (diff)
downloadtk-6bc69f25be173b45433fedf824047a8900f80183.zip
tk-6bc69f25be173b45433fedf824047a8900f80183.tar.gz
tk-6bc69f25be173b45433fedf824047a8900f80183.tar.bz2
[Bug 3223850] - button remains stuck when disabled as depressed on XP
If a button is disabled while the state is pressed, then the release event handler did not remove the pressed state. Modified the handler to always remove the pressed state while only calling invoke if !disabled. Reported-by: Thomas MENEZ <thomasmenez@users.sourceforge.net> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> FossilOrigin-Name: 3837f9f2914fe138a0fee1ff6ef295cbb16d614b
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/button.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/ttk/button.tcl b/library/ttk/button.tcl
index fc9c1bb..8ccdb91 100644
--- a/library/ttk/button.tcl
+++ b/library/ttk/button.tcl
@@ -28,7 +28,7 @@ bind TButton <<Invoke>> { ttk::button::activate %W }
bind TButton <ButtonPress-1> \
{ %W instate !disabled { ttk::clickToFocus %W; %W state pressed } }
bind TButton <ButtonRelease-1> \
- { %W instate {pressed !disabled} { %W state !pressed; %W invoke } }
+ { %W instate pressed { %W state !pressed; %W instate !disabled { %W invoke } } }
bind TButton <Button1-Leave> \
{ %W state !pressed }
bind TButton <Button1-Enter> \