Tk Source Code

Check-in [85428671]
Login

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

Overview
Comment:Fix for [fde9dc2392]: X error BadDrawable when using ttk::style element create with multiple displays
Downloads: See separate download page
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: 8542867141dba664c4abd9c86aa9b1a1f8745645af13435fcc8ba4ba8b4b5e85
User & Date: csaba 2026-10-25 12:42:01.865
References
2026-10-26
11:43 • Closed ticket [fde9dc23]: X error BadDrawable when using ttk::style element create with multiple displays plus 7 other changes artifact: c1bb7bb6 user: nemethi
Context
2026-10-26
13:08
tkMacOSXSend.c: add missing cast to NULL sentinel check-in: dafb859c user: chrstphrchvz tags: trunk, main
12:44
Fix for [042da6013e]: give the demos colours which go with their background.

The pendulum demo gives its canvases a white background but leaves the text items at the default foreground, which under a dark appearance is white, so the caption and the axis labels could not be seen. Give those items a fill of their own, as the other demos were given one.

The widget demo colours its index links for a light background, which the text widget need not have: a #303080 link on a dark one cannot be read. Choose the set which goes with the background the text widget actually has, by the weighting tk_setPalette uses to decide between a black and a white foreground. closed check-in: 72d8eb47 user: serhiy.storchaka tags: demo-colors-dark-mode

12:31
Fix for [807b2f8916]: compute the colours of the default ttk theme which no X resource supplies.

A desktop which translates its theme into X resources generally sets only background and foreground, which reach three of the theme's thirteen colours. The rest kept values chosen for a light grey palette, so a dark background was left beside a near-white -activebg and a light -darker: the text of a hovered button became illegible.

Compute them instead from the colours the option database does answer for, by the rules tk_setPalette applies to the classic widgets, so that the two agree. The selection colour is not computed: it is an accent rather than a shade of the frame.

Four of those rules are factored into ::tk::ContrastColor, ::tk::Lighten, ::tk::BlendColors and the existing ::tk::Darken, which tk_setPalette now calls instead of writing them out; its output is unchanged. ::tk::Darken scaled a component down to eight bits before applying the percentage, losing up to a unit, and now divides once. closed check-in: d0c3cb85 user: serhiy.storchaka tags: ttk-derive-missing-colors

10:22
tkMacOSXSend.c: add missing cast to NULL sentinel closed check-in: 7b25720e user: chrstphrchvz tags: mac-send-sentinel-cast
2026-10-25
20:50
Merge trunk check-in: c92f6d49 user: kevin_walzer tags: wayland
20:12
Fix for [fde9dc2392]: X error BadDrawable when using ttk::style element create with multiple displays check-in: 07e021e2 user: csaba tags: core-9-0-branch
12:42
Fix for [fde9dc2392]: X error BadDrawable when using ttk::style element create with multiple displays check-in: 85428671 user: csaba tags: trunk, main
11:35
Fix for [220931ffff]: option get command responding to invalid input check-in: 0a7003b0 user: csaba tags: trunk, main
2026-09-28
14:20
Fix [fde9dc2392]: X error BadDrawable when using an image element created by "ttk::style element create" on another display. The images of an image specification are now got for a window on the display where they are drawn, and released when that window is destroyed. New tests image-3.1 and image-3.2. closed check-in: 63631a59 user: serhiy.storchaka tags: ttk-image-multiple-displays
Changes
Unified Diff Side-by-Side Diff Patch
Changes to changes.md.
Changes to generic/ttk/ttkImage.c.
Changes to tests/ttk/image.test.