diff options
author | patthoyts <patthoyts@noemail.net> | 2011-03-19 02:02:49 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2011-03-19 02:02:49 (GMT) |
commit | eea81768e879c9c3396427d0d4a1e03891e4b1b5 (patch) | |
tree | 2f99ee8dbd95298ebdb8e68780c148bfd3151a1e /library/ttk | |
parent | 88043512e067240f2d0acc1ed6b3e23d735533b0 (diff) | |
parent | 6bc69f25be173b45433fedf824047a8900f80183 (diff) | |
download | tk-eea81768e879c9c3396427d0d4a1e03891e4b1b5.zip tk-eea81768e879c9c3396427d0d4a1e03891e4b1b5.tar.gz tk-eea81768e879c9c3396427d0d4a1e03891e4b1b5.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: d36ac26e91f80d6f7ac5af1c77ba5340e798e76c
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/button.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/ttk/button.tcl b/library/ttk/button.tcl index 3baefe2..22032e4 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> \ |