diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-07 07:40:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-07 07:40:40 (GMT) |
commit | aa7acf035dbe0876737e7f49343baadd36260d97 (patch) | |
tree | 5afcd1517eff9c2965f4dee788dabb9071237ae6 /generic | |
parent | 440fe6af37c443d9c2b75ca66918902990264da7 (diff) | |
parent | db1b8a5882c70d2016d8f24c02bc8f70fa5eb155 (diff) | |
download | tk-aa7acf035dbe0876737e7f49343baadd36260d97.zip tk-aa7acf035dbe0876737e7f49343baadd36260d97.tar.gz tk-aa7acf035dbe0876737e7f49343baadd36260d97.tar.bz2 |
Merge fixes for [40e4bf61] and [e3888d5820]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 32 | ||||
-rw-r--r-- | generic/tkEntry.c | 10 |
2 files changed, 23 insertions, 19 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index fbc976b..eacdf56 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -4388,17 +4388,6 @@ HandleEventGenerate( } /* - * Now we have constructed the event, inject it into the event handling - * code. - */ - - if (synch) { - Tk_HandleEvent(&event.general); - } else { - Tk_QueueWindowEvent(&event.general, pos); - } - - /* * We only allow warping if the window is mapped. */ @@ -4407,11 +4396,6 @@ HandleEventGenerate( Tk_Window warpWindow = Tk_IdToWindow(dispPtr->display, event.general.xmotion.window); - if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) { - Tcl_DoWhenIdle(DoWarp, dispPtr); - dispPtr->flags |= TK_DISPLAY_IN_WARP; - } - if (warpWindow != dispPtr->warpWindow) { if (warpWindow) { Tcl_Preserve(warpWindow); @@ -4424,6 +4408,22 @@ HandleEventGenerate( dispPtr->warpMainwin = mainWin; dispPtr->warpX = event.general.xmotion.x; dispPtr->warpY = event.general.xmotion.y; + + if (!(dispPtr->flags & TK_DISPLAY_IN_WARP)) { + Tcl_DoWhenIdle(DoWarp, dispPtr); + dispPtr->flags |= TK_DISPLAY_IN_WARP; + } + } + + /* + * Now we have constructed the event, inject it into the event handling + * code. + */ + + if (synch) { + Tk_HandleEvent(&event.general); + } else { + Tk_QueueWindowEvent(&event.general, pos); } } diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 468eabe..5fbff40 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -3293,17 +3293,21 @@ EntryValidateChange( if (entryPtr->validateCmd == NULL || entryPtr->validate == VALIDATE_NONE) { + if (entryPtr->flags & VALIDATING) { + entryPtr->flags |= VALIDATE_ABORT; + } return (varValidate ? TCL_ERROR : TCL_OK); } /* - * If we're already validating, then we're hitting a loop condition Return - * and set validate to 0 to disallow further validations and prevent - * current validation from finishing + * If we're already validating, then we're hitting a loop condition. Set + * validate to none to disallow further validations, arrange for flags + * to prevent current validation from finishing, and return. */ if (entryPtr->flags & VALIDATING) { entryPtr->validate = VALIDATE_NONE; + entryPtr->flags |= VALIDATE_ABORT; return (varValidate ? TCL_ERROR : TCL_OK); } |