Tk Source Code

Check-in [ebe87fbf]
Login

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

Overview
Comment:Fix for [3f5867c997]: Inconsistency between grid info, place info and pack info
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: ebe87fbfd17ab493ddfc5c4b4e6e83bca82e5d3a52e1272a2355fda1725fa621
User & Date: csaba 2026-11-02 17:30:11.654
References
2026-11-02
17:49 • Closed ticket [3f5867c9]: Inconsistency between grid info, place info and pack info plus 7 other changes artifact: 19d5692e user: nemethi
Context
2026-11-02
20:54
Simplify initialization for tk::start|endOfCluster on Aqua check-in: 98bc9f08 user: jan.nijtmans tags: trunk, main
20:12
Merge main - preparing for merge into main closed check-in: fc571104 user: culler tags: tip_765
20:00
Implement [wm attributes $w -appearance] and [winfo isdark] on X11, as TIP 766 proposes. TIP 750 left both out here: the attribute was rejected as a bad attribute, and the command always returned false, because X11 gives a window no appearance of its own. What a window does have is the colour it is painted, and that colour can already be dark: a desktop or a user who wants dark applications says so in the X resource database, which Tk has always obeyed. So [winfo isdark] now reports whether the window's background is a dark colour, by the weighting tk_setPalette uses to choose between a black and a white foreground, and answers from the attributes Tk records rather than realizing the window. The attribute applies a palette: light and dark are tk_setPalette's, over the background Tk has always had and a dark counterpart, and auto is the palette which was in effect before the attribute was first set, remembered for the purpose and restored exactly, including the colours Tk has compiled in rather than computed. Only the colours which go with the background change. The selection colours are supplied rather than computed from it: an accent goes with a light frame and a dark one alike, and the classic widgets and the themed ones have each had their own, which tk_setPalette on its own would replace with a shade of the background six units from the frame. Because the option database has no per-window scope, the palette is the application's and not the window's, which the tests state on both sides. seedColors takes the colours its caller imposes as an argument, so that the rules which follow the selection keep one home. Three tests of the attribute which were portable but lived in the Windows-only file move to wm.test, the duplicate of the usage test goes, and the check that [winfo isdark] follows the attribute loses the constraint which kept it off X11. check-in: da72c23c user: serhiy.storchaka tags: x11-appearance
19:14
Windows: ::tk::startOfCluster and ::tk::endOfCluster implemented with Uniscribe, used since [2e58f8e6aa], returned UTF-8 byte offsets instead of character indices, and for "end" read past the end of the break attributes, so a click at the start of a line could set the cursor after the first character (text-38.2, textDisp-32.4). Return character indices, parse the index and handle indices out of range as the ICU implementation does, and break each script run separately. Tests cluster-1.8 to 1.10 and 2.8 to 2.10. check-in: 0d86873f user: serhiy.storchaka tags: win-uniscribe-cluster
18:57
Rename accidental fork closed check-in: 57632f9c user: dgp tags: tip_765_XXX
18:46
Fix [517e4ef666]: DlineXOfIndex reads an embedded image or window as a CharInfo. Check that the chunk is a character chunk before reading its CharInfo, and remove a block which could never return. closed check-in: 98e29d00 user: serhiy.storchaka tags: text-dlinexofindex-image
17:30
Fix for [3f5867c997]: Inconsistency between grid info, place info and pack info check-in: ebe87fbf user: csaba tags: trunk, main
15:58
Continue to use ICU for tk::startOfNextWord/startOfPreviousWord/endOfWord on Windows check-in: 2e58f8e6 user: jan.nijtmans tags: trunk, main
2026-09-28
11:35
Fix [3f5867c997]: Inconsistency between grid info, place info and pack info closed check-in: 320e533d user: jan.nijtmans tags: bug-3f5867c997
Changes
Unified Diff Side-by-Side Diff Patch
Changes to changes.md.
Changes to doc/grid.n.
Changes to doc/pack.n.
Changes to doc/place.n.
Changes to generic/tkPack.c.
Changes to generic/tkPlace.c.
Changes to tests/pack.test.
Changes to tests/place.test.