Tk Source Code

Check-in [eb2b41d5]
Login

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

Overview
Comment:Fix [a4fa3ad2d6]: event misbehavior with certain widgets when embedding

After the embedded application claimed the focus, the window manager set the X focus back to the container's toplevel, and Tk ignored that FocusIn (NotifyInferior), so key events went to the container until a Leave/Enter cycle. Pass the X focus on to the embedded application again.

Downloads: See separate download page
Timelines: family | ancestors | descendants | both | x11-embed-focus-return
Files: files | file ages | folders
SHA3-256: eb2b41d5b3458408fc140d4d11b4b16ae6e369c07d8547b091b8007523d00230
User & Date: serhiy.storchaka 2026-09-19 12:59:23.837
References
2026-09-19
16:22 • Closed ticket [480158ff]: initial focus fails in child interp plus 5 other changes artifact: e7835143 user: serhiy.storchaka
15:03 • Closed ticket [936195ff]: Reset focus to embedded windows (bug fix) plus 5 other changes artifact: 3590101a user: serhiy.storchaka
13:00 • Ticket [a4fa3ad2] event misbehavior with certain widgets when embedding status still Open with 3 other changes artifact: 8f640ab2 user: serhiy.storchaka
Context
2026-09-22
06:22
Add a test for [a4fa3ad2d6], with a testxfocus command which returns the Tk window with the X input focus and can set it as a window manager does check-in: 63c88e8a user: serhiy.storchaka tags: x11-embed-focus-return
2026-09-19
12:59
Fix [a4fa3ad2d6]: event misbehavior with certain widgets when embedding

After the embedded application claimed the focus, the window manager set the X focus back to the container's toplevel, and Tk ignored that FocusIn (NotifyInferior), so key events went to the container until a Leave/Enter cycle. Pass the X focus on to the embedded application again. check-in: eb2b41d5 user: serhiy.storchaka tags: x11-embed-focus-return

2026-09-18
19:39
merge release check-in: 8a1f6836 user: dgp tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkFocus.c.