Tk Source Code

Check-in [e978f0d4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [5d52ad92fa]: creating widgets is slow when an input method is active
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: e978f0d45775b351139d6b07c90decd53b9bb9b5d969aa3e6a7b96986d57edeb
User & Date: jan.nijtmans 2026-09-25 14:13:14.311
References
2026-10-08
15:23 • Closed ticket [340006f5]: X11 is very slow to create widgets plus 5 other changes artifact: 03fce933 user: serhiy.storchaka
2026-09-27
06:59 • Ticket [5d52ad92] TK ibus interaction slows down widget creation status still Open with 3 other changes artifact: d73673cb user: serhiy.storchaka
Context
2026-09-25
16:33
Fix [434c8dd804]: crash in Tk_ConfigureWidget when a default value of a canvas item option is invalid. The error message used specPtr->dbName, which is NULL for canvas item options; use the option name instead. This happened, for example, when fontconfig finds no fonts. closed check-in: dc715711 user: serhiy.storchaka tags: canvas-default-error-crash
15:26
Fix [791527]: menu entries are drawn directly on the screen check-in: 0e6c3431 user: jan.nijtmans tags: trunk, main
15:09
Fix [5d52ad92fa]: creating widgets is slow when an input method is active check-in: 7345531f user: jan.nijtmans tags: core-9-0-branch
14:50
Fix [1dfc71ae4a]: configure fails without HarfBuzz although --enable-bidi was not given. Unless --enable-bidi is given explicitly, a missing, too old or unusable HarfBuzz now only disables Bidi with a warning, as a too old one did before; with --enable-bidi it is an error which mentions --disable-bidi. HAVE_BIDI, the Bidi flags and font objects are now set only after HarfBuzz was found usable; before, a build with a too old HarfBuzz still defined HAVE_BIDI with the non-Bidi font code. Regenerated configure with autoconf 2.73. closed check-in: b83a8093 user: serhiy.storchaka tags: configure-bidi-without-harfbuzz
14:13
Fix [5d52ad92fa]: creating widgets is slow when an input method is active check-in: e978f0d4 user: jan.nijtmans tags: trunk, main
14:08
Fix [7579c335f1]: Text widget: wrong bbox widths for non-ASCII characters with bidi text rendering check-in: 5299492c user: jan.nijtmans tags: trunk, main
2026-09-23
20:28
Fix [5d52ad92fa]: creating widgets is slow when an input method is active

Tk created an X input context for every window as soon as it got any event, and every creation costs a round trip to the input method. With ibus running this made the creation of widgets about ten times slower: 480 labels took about 470 ms instead of 36 ms, and the delay grew with the number of widgets.

Now the input context is created only for a toplevel and for the window which receives the focus, which is where it is used. With ibus the same 480 labels take 20-29 ms and 480 entries 6-7 ms. Based on the approach of the abandoned bug-xim branch by Brad Lanam. closed check-in: 894c1665 user: serhiy.storchaka tags: x11-lazy-xic

Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkEvent.c.