Tk Source Code

Check-in [a0eb4e7a]
Login

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

Overview
Comment:Aqua: do not hang if idle handlers keep scheduling idle handlers.

The macOS code ran idle handlers until there were none left when a window was first shown, deiconified or resized live, and while a menu was tracked. An idle handler which schedules a new idle handler each time, directly or through the event handlers which it invokes (e.g. the canvas redisplay with Enter and Leave bindings which move the current item away from the pointer and back, [1813595]), made these loops never end. Now at most MAX_IDLE_PASSES passes are done (TkMacOSXProcessIdleEvents), and the remaining idle handlers run later from the event loop. Not tested on macOS.

Downloads: See separate download page
Timelines: family | ancestors | descendants | both | aqua-bounded-idle-loops
Files: files | file ages | folders
SHA3-256: a0eb4e7a8c711596301e42c29b4581c675da8249a01f88c9da0c1a68519e402d
User & Date: serhiy.storchaka 2026-10-02 06:32:58.455
Context
2026-10-02
17:04
Aqua: raise the limit of idle passes from 10 to 1000.

A complete redraw can need many passes: about two per level of nested geometry managers (13 for 5 levels, 83 for 40, measured on X11), so 10 passes would leave the drawing unfinished in real applications. closed check-in: f04fe80c user: serhiy.storchaka tags: aqua-bounded-idle-loops

06:32
Aqua: do not hang if idle handlers keep scheduling idle handlers.

The macOS code ran idle handlers until there were none left when a window was first shown, deiconified or resized live, and while a menu was tracked. An idle handler which schedules a new idle handler each time, directly or through the event handlers which it invokes (e.g. the canvas redisplay with Enter and Leave bindings which move the current item away from the pointer and back, [1813595]), made these loops never end. Now at most MAX_IDLE_PASSES passes are done (TkMacOSXProcessIdleEvents), and the remaining idle handlers run later from the event loop. Not tested on macOS. check-in: a0eb4e7a user: serhiy.storchaka tags: aqua-bounded-idle-loops

2026-10-01
20:18
Fix [1439266]: spinbox -values overrides the value of the -textvariable check-in: 9929acd1 user: jan.nijtmans tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to macosx/tkMacOSXInit.c.
Changes to macosx/tkMacOSXNotify.c.
Changes to macosx/tkMacOSXPrivate.h.
Changes to macosx/tkMacOSXWindowEvent.c.
Changes to macosx/tkMacOSXWm.c.