Tk Source Code

Timeline
Login

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

50 most recent check-ins

2026-09-23
13:23
Rebase to trunk. Review: use more bools and/or flags leaf check-in: 1db01f71 user: jan.nijtmans tags: x11-wm-hidden-state, core-x11-wm-hidden-state
11:14
Updated the changes file. leaf check-in: f2432fe2 user: csaba tags: core-8-6-branch
11:07
Fix for [3de1b72157]: ttk::notebook takes the focus when clicked, even with the -takefocus 0 option. check-in: 08026898 user: csaba tags: core-8-6-branch
11:01
Fix for [3de1b72157]: ttk::notebook takes the focus when clicked, even with the -takefocus 0 option. leaf check-in: 76f25dd9 user: csaba tags: core-9-0-branch
10:33
Fix for [3de1b72157]: ttk::notebook takes the focus when clicked, even with the -takefocus 0 option. leaf check-in: a695f427 user: csaba tags: trunk, main
09:19
Fix [223635]: NULL dereference as result of peculiarly formed font name. Update changelog check-in: 16ff7e43 user: jan.nijtmans tags: core-8-6-branch
08:56
Fix [2236352]: NULL dereference as result of peculiarly formed font name check-in: ec6c013e user: jan.nijtmans tags: core-9-0-branch
08:53
Fix [2236352]: NULL dereference as result of peculiarly formed font name check-in: d26ddd6f user: jan.nijtmans tags: trunk, main
08:31
Fix [b086bb1d61]: ttk::style command moves ttk::panedwindow sashes

Backport of [880f8c8d59] from 9.0 and 9.1. A pane in a hidden notebook tab is unmapped, so its geometry request was taken as the initial request of a pane which is not shown yet, and it overwrote the sash position. The new Ttk_ContentIsMapped() tells whether the pane has been placed, which does not change while the panedwindow itself is unmapped. Test paned-unmapped-1. check-in: 0b59d9cd user: serhiy.storchaka tags: core-8-6-branch

08:25
On macOS, do not replace the signal handlers of the embedding application

Backport of [87fa518cee] from 9.0 and 9.1: the SIGINT, SIGHUP and SIGTERM handlers are only installed if the application which embeds Tk has not installed its own (e.g. Python raises KeyboardInterrupt from its SIGINT handler). check-in: c505fe41 user: serhiy.storchaka tags: core-8-6-branch

08:12
[52e9b0f5] MS-Win: Add keysims for non-latin keys + MacOS: correct 338 pre-2004 keysyms from Armenian, Georgian, Vietnamese, Latin-8, Latin-9, Farsi, Arabic and Cyrillic check-in: ed0bded4 user: oehhar tags: core-9-0-branch
08:04
Fix [a9bd2ab98b], [f492c3de04]: keyboard input on Windows

Backport of the fixes from 9.0 and 9.1.

A WM_KEYDOWN message with VK_PACKET, sent for a character entered via an input method or the touch keyboard, was re-posted with the character as the virtual key code, so the KeyPress event had the keysym of a function key. Now no events are generated for the VK_PACKET key itself; the WM_CHAR message produced by TranslateMessage() generates the key events.

GetTranslatedKey() retrieved the WM_CHAR messages with GetMessageA(), so Windows converted the characters to the code page of the keyboard layout, and TkpGetString() decoded them with a code page guessed from the input language. When the two differed, the typed characters were mangled. Now the messages are retrieved as Unicode and the characters are stored as UTF-8 in the key event, and the code page machinery is removed.

Tests event-8.4, event-8.5 and event-8.6, and the missing testsendinput constraint. check-in: 4a7d6f6b user: serhiy.storchaka tags: core-8-6-branch

07:37
[52e9b0f5] MS-Win: Add keysims for non-latin keys + MacOS: correct 338 pre-2004 keysyms from Armenian, Georgian, Vietnamese, Latin-8, Latin-9, Farsi, Arabic and Cyrillic check-in: db39aee2 user: oehhar tags: trunk, main
07:35
Fix [1723059]: entryconfigure of a cascade entry destroys its menu

The entry of a cloned menu points to a clone of the cascade menu, not to the cascade menu itself. If the cascade entry of a menubar menu was configured with the menu which it already had, ConfigureMenuCloneEntries() passed the -menu option to the clones anyway, so their entries pointed to the cascade menu itself, and the next change of the entry deleted it as if it were a clone. Now the -menu option is not passed to the clones if the cascade menu is not changed. Test menu-42.1. leaf check-in: ef4c3587 user: serhiy.storchaka tags: menu-clone-cascade-destroy

01:39
Cleaner GI test runner leaf check-in: 2b25618f user: kevin_walzer tags: wayland_test
2026-09-22
20:32
Ignore the events of switching the keyboard layout in the tests

Switching the keyboard layout on Windows releases the modifiers of the key which switches it, so a KeyRelease event for Control arrives after the switch. It was delivered only when the test ran the event loop, which happens after the bindings are set, so it was recorded by tests event-8.7 and event-8.8 and they failed. Now the event loop is run after switching the layout and before setting the bindings. closed check-in: 62fc0288 user: serhiy.storchaka tags: win-keysyms

19:24
Fix for [b086bb1d61]: ttk::style command moves ttk::panedwindow sashes. check-in: 843ddd2f user: csaba tags: core-9-0-branch
19:11
Document that a cloned menu is the one which is posted [911951]

A menu which is used as a menubar or is torn off is not posted itself: its clone is posted, and on Windows and macOS the menus are drawn by the system, so no Tk window is mapped at all. winfo and wm therefore report nothing useful for such a menu and for the menus of its cascade entries, which is what the ticket describes. leaf check-in: 1742a9e8 user: serhiy.storchaka tags: doc-menu-clone-geometry

19:10
Fix for [b086bb1d61]: ttk::style command moves ttk::panedwindow sashes. check-in: 7f352b01 user: csaba tags: trunk, main
18:50
Fix [791527]: menu entries are drawn directly on the screen

Every other widget draws into off-screen memory and copies the result on the screen in a single operation, but the menu drew its entries directly into its window, so they blinked when the pointer moved over them, which is noticeable on a slow display. Each entry is now drawn into a pixmap of its size and copied. The rendering is not changed. leaf check-in: 771fe02c user: serhiy.storchaka tags: x11-menu-double-buffer, core-x11-menu-double-buffer

18:40
Fix [726351]: the size hints of a toplevel ignore its menubar

On X11 the window manager sizes the wrapper window, which is higher than the toplevel by the height of the menubar, and all wm commands are in terms of the toplevel. UpdateSizeHints() passed the minimum and the maximum size to the window manager unchanged, so a window with a menubar could be resized by the user to less than "wm minsize" and could not be resized to "wm maxsize", in both cases by the height of the menubar. The gridded case and a window which is not resizable already accounted for it. Test unixWm-63.1. leaf check-in: 2de1c036 user: serhiy.storchaka tags: x11-menubar-size-hints

17:36
Document the platform differences of posting a menu [585003]

On X11 a posted menu is a window of the application: tk_popup and the post widget command return as soon as the menu is posted, and the menu generates <Map> and <Unmap> events. On Windows and macOS the menu is displayed by the system, which runs its own event loop while the menu is posted, so the commands do not return before the menu is unposted again and no <Map> or <Unmap> events are generated for the menu. Neither manual page said so. leaf check-in: a2b23a51 user: serhiy.storchaka tags: doc-popup-platform

16:19
Fix [eb0393e7b7]: [grid forget] silently resets the forgotten window's own [grid propagate] setting check-in: 46faf35c user: jan.nijtmans tags: trunk, main
16:17
Fix [eb0393e7b7]: [grid forget] silently resets the forgotten window's own [grid propagate] setting check-in: 17f245f0 user: jan.nijtmans tags: core-9-0-branch
16:07
Oops2 check-in: 19c684cc user: jan.nijtmans tags: core-9-0-branch
16:05
Oops check-in: 0c8ed2f4 user: jan.nijtmans tags: core-9-0-branch
15:37
Reword the description of -command for cascade entries

Describe the current behaviour without saying what it is for: the option is not evaluated when the user selects the entry, and is evaluated only by the invoke widget command. leaf check-in: 6c701cbc user: serhiy.storchaka tags: doc-cascade-command

15:28
Fix [220868]: -command of a cascade menu entry is never evaluated interactively

The manual said that the -command option of a cascade entry is evaluated whenever the entry is invoked and that this is not supported on Windows. In fact no platform evaluates it when the user selects the entry: on X11 tk::MenuInvoke posts the submenu instead, and on Windows and macOS the menus are handled by the system, which never invokes a cascade item. It is evaluated by the invoke widget command, on all platforms. The documentation is corrected accordingly and a test for a cascade entry is added to the tests of TkInvokeMenu. check-in: 311829db user: serhiy.storchaka tags: doc-cascade-command

15:16
Made the look of the Wide.TSpinbox style more native on Windows. check-in: cca48298 user: csaba tags: trunk, main
15:10
Fix for bug [56d4d132fd], patch against an earlier version of trunk was built and tested on Linux, macOS, Windows/MSYS+gcc, Windows/VC++. leaf check-in: db2fc66a user: kjnash tags: bug-56d4d132fd-child-interp
14:57
Merge trunk check-in: 68786e8d user: jan.nijtmans tags: win-keysyms
14:55
Create new branch named "bug-56d4d132fd-child-interp" check-in: 9dcde54c user: kjnash tags: bug-56d4d132fd-child-interp
14:28
Tcl_Free -> ckfree (for consistancy) check-in: 203ae933 user: jan.nijtmans tags: core-9-0-branch
14:22
Fix for [300bad1beb]: Using tab to cycle through tkinter widgets breaks foreground styling. check-in: 6fd3834b user: csaba tags: trunk, main
14:11
Fix [9e89324a0a]: spinbox parsing depends on the LC_NUMERIC locale check-in: e0dd3fdb user: jan.nijtmans tags: core-8-6-branch
13:26
Fix [1954833]: busy canvas after a cursor change

Every configure of a canvas redrew all its items, even for options which do not affect their appearance, which is expensive for a canvas with many items. Now the items are redrawn only if an option other than -closeenough, -cursor, -takefocus, the scroll commands and the scroll increments was given. leaf check-in: 9ad5b07c user: serhiy.storchaka tags: canvas-configure-redraw, core-canvas-configure-redraw

13:06
Fix [1954237]: double click is lost if processing a click takes too long

On Windows the time of a mouse or key event was the time at which the message was processed, not the time at which it was posted, so if a binding script ran longer than the double click time, the events of the second click got too late times and no <Double-1> event was generated. A new TkpGetEventTime() returns GetMessageTime() on Windows and the current time on macOS. leaf check-in: 6498c685 user: serhiy.storchaka tags: win-event-time, core-win-event-time

12:50
Fix [9e89324a0a]: spinbox parsing depends on the LC_NUMERIC locale check-in: 0fd8698e user: jan.nijtmans tags: core-9-0-branch
12:43
Fix [2148529]: canvas scrolls when the scrollbar indicates that it cannot

When the scroll region is not larger than the visible area, the canvas could be scrolled into the empty area outside the region, although xview and yview reported that there is nothing to scroll. The origin is now kept at the top left corner of the scroll region in this case. leaf check-in: 6f39abf1 user: serhiy.storchaka tags: canvas-confine-small-region, core-canvas-confine-small-region

12:23
Fix [9e89324a0a]: spinbox parsing depends on the LC_NUMERIC locale check-in: 009719f2 user: jan.nijtmans tags: trunk, main
11:03
Fix [1813595]: loop race in canvas Enter / Leave bindings

If the bindings for Enter and Leave moved the current item away from the pointer and back, the canvas chose the current item again and again in a loop when it was redisplayed, without returning to the event loop, so the application hung. Now the current item is chosen once per redisplay, and if it needs to be chosen again, this is done at the next redisplay.

Also remove the update commands scheduled by tests canvPs-3.1 and canvPs-3.2 for after the tests (part A of [180c47a672]): they were executed in later tests, and the new test canvas-30.1 hangs if one of them is executed in it. leaf check-in: 91ba3680 user: serhiy.storchaka tags: canvas-repick-loop, core-canvas-repick-loop

10:25
Fix [a9bd2ab98b], [f492c3de04] ...: Keyboard input on Windows IME-related problems check-in: 73b1db6d user: jan.nijtmans tags: core-9-0-branch
10:22
Add a test for [1202684]: non-ASCII characters in the PostScript output of text items leaf check-in: 4a5871f9 user: serhiy.storchaka tags: canvps-glyph-names-test, core-canvps-glyph-names-test
10:12
Fix [a9bd2ab98b], [f492c3de04] ...: Keyboard input on Windows IME-related problems. check-in: a444f9c1 user: jan.nijtmans tags: trunk, main
09:29
Fix [4eef1fa86e]: X11 (HarfBuzz/SheenBidi font backend): strings longer than 512 characters are truncated when drawn, and glyphs beyond 16-bit coordinates wrap around

The glyphs are now drawn in batches of 512, and glyphs outside the 16-bit coordinate range of Xft are skipped, as in the Xft backend. This also fixes [770578] for this backend. leaf check-in: 4c1e52f0 user: serhiy.storchaka tags: x11-bidi-long-text

09:14
Fix [707778]: canvas/scrollbar return wrong configure synonym info

Tk_ConfigureInfo() reported a synonym option together with the database name of the option it refers to, not with its name as Tk_GetOptionInfo() does. The documentation of TK_CONFIG_SYNONYM said that the dbName field holds the name of the option, while it holds its database name, as in all option tables. leaf check-in: 03d1a43c user: serhiy.storchaka tags: oldconfig-synonym-info, core-oldconfig-synonym-info

08:51
Fix [701927]: extremely long, fat lines not displayed

Converting huge coordinates to the integer bounding box of a canvas item overflowed, either in the conversion itself or when the box was enlarged by the width of the item, so the item was never displayed or found. The coordinates are now clamped to half the int range before the conversion. leaf check-in: 3ebfb228 user: serhiy.storchaka tags: canvas-bbox-overflow, core-canvas-bbox-overflow

08:31
Fix [220895]: Canvas inconsistently draws lines on Windows

GDI does not draw the last point of a polyline drawn with a cosmetic pen, so which end of a line of width 1 was missing depended on the order of its points. Now the end points of such lines are drawn as on X11: an end point is drawn if and only if it is the left or top end of its segment, independently of the order of the points. leaf check-in: 38ab656c user: serhiy.storchaka tags: win-thin-line-endpoints

07:44
Fix [220796]: -stipple option for canvas text item disrupts positioning on Windows

Text was drawn without the stipple, and angled text with the stipple was misplaced. Text with a stipple is now drawn into a memory DC and copied through the stipple pattern, in the same way as other stippled objects, for both the Uniscribe and the angled text path. leaf check-in: 99b9c92a user: serhiy.storchaka tags: win-text-stipple

07:16
Fix [220787]: Stipple patterns don't work in arc/oval items on Windows

The stipple of the GC was ignored when drawing arcs, chords, pie slices and rectangle outlines on Windows. The rendering through the stipple pattern used for polygons and lines is moved to a shared RenderStippled() and used for them too. This also fixes [220059] (-outlinestipple of rectangles). leaf check-in: 72e46db6 user: serhiy.storchaka tags: win-canvas-arc-stipple