diff options
author | fvogel <fvogelnew1@free.fr> | 2022-01-08 23:25:25 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2022-01-08 23:25:25 (GMT) |
commit | c899dbf66e51a838c5465cfc6f016b9f8cf9f655 (patch) | |
tree | b8a1ea322205b08753630a6ba8f00cc347faf809 /generic/tkTextWind.c | |
parent | 4ae8151f60ee80ea5020607662377c8fbe0ec190 (diff) | |
parent | 6148b69cbf3d764d8890f6ced24464c0f8410671 (diff) | |
download | tk-c899dbf66e51a838c5465cfc6f016b9f8cf9f655.zip tk-c899dbf66e51a838c5465cfc6f016b9f8cf9f655.tar.gz tk-c899dbf66e51a838c5465cfc6f016b9f8cf9f655.tar.bz2 |
Backout the wrong fix [83d63659] for [1501749fff], but keep the non-regression testcase marked with 'knownBug' constraint.
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r-- | generic/tkTextWind.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index d63ad32..7d56084 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -1129,16 +1129,6 @@ TkTextEmbWinDisplayProc( &lineX, &windowY, &width, &height); windowX = lineX - chunkPtr->x + x; - /* - * Mark the window as displayed so that it won't get unmapped. - * This needs to be done before the next instruction block because - * Tk_MaintainGeometry/Tk_MapWindow will run event handlers, in - * particular for the <Map> event, and if the bound script deletes - * the embedded window its clients will get freed. - */ - - client->displayed = 1; - if (textPtr->tkwin == Tk_Parent(tkwin)) { if ((windowX != Tk_X(tkwin)) || (windowY != Tk_Y(tkwin)) || (Tk_ReqWidth(tkwin) != Tk_Width(tkwin)) @@ -1150,6 +1140,16 @@ TkTextEmbWinDisplayProc( Tk_MaintainGeometry(tkwin, textPtr->tkwin, windowX, windowY, width, height); } + + /* + * Mark the window as displayed so that it won't get unmapped. + * <TODO>: Tk_MaintainGeometry/Tk_MapWindow may run event handlers, + * in particular for the <Map> event. If the bound script + * deletes the embedded window or the text widget we will + * soon crash. + */ + + client->displayed = 1; } /* |