diff options
author | fvogel <fvogelnew1@free.fr> | 2020-01-18 12:12:46 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-01-18 12:12:46 (GMT) |
commit | 2f09e3e81874d1261f624bbdbec3e1ec2a94446f (patch) | |
tree | 2f6460b1fbde06913265ac9c70667ef59e0c64dc /generic | |
parent | 31f67224a92cd43e51a0bf7131764f06eb30b742 (diff) | |
parent | 3930846c8e8c238310cc93c4214f54ca4fc9e27b (diff) | |
download | tk-2f09e3e81874d1261f624bbdbec3e1ec2a94446f.zip tk-2f09e3e81874d1261f624bbdbec3e1ec2a94446f.tar.gz tk-2f09e3e81874d1261f624bbdbec3e1ec2a94446f.tar.bz2 |
Fix [2830360fff]: ttk::entry looses state invalid at focus events. Add non-regression test entry-11.1
Diffstat (limited to 'generic')
-rw-r--r-- | generic/ttk/ttkEntry.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 37b4dbc..842c4b5 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -676,8 +676,12 @@ static int EntryRevalidate(Tcl_Interp *interp, Entry *entryPtr, VREASON reason) static void EntryRevalidateBG(Entry *entryPtr, VREASON reason) { Tcl_Interp *interp = entryPtr->core.interp; - if (EntryRevalidate(interp, entryPtr, reason) == TCL_ERROR) { - Tcl_BackgroundException(interp, TCL_ERROR); + VMODE vmode = entryPtr->entry.validate; + + if (EntryNeedsValidation(vmode, reason)) { + if (EntryRevalidate(interp, entryPtr, reason) == TCL_ERROR) { + Tcl_BackgroundException(interp, TCL_ERROR); + } } } |