Overview
| Artifact ID: | 3864c4432543d5e732a320693ddcb5ec5949b875 |
|---|---|
| Ticket: | 645964ffffffffffffffffffffffffffffffffff
"update idle" fails to redraw tk windows |
| User & Date: | dkf on 2002-12-03 20:22:18 |
Changes
- closedate changed to: "2002-12-03T13:22:18"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Your expectations are wrong. Whenever you do [update idletasks], Tcl drains its queue of pending idle events, which includes internally-generated redraws of Tk windows. However, it processes no events from external sources, and cannot do because there is no easy way to tell what matters in that respect and what does not; window size and position changes are particularly tricky, and can be triggered by updates of content of other windows too. And this applies to both internal and toplevel windows; <Configure> event handlers make things tricky, and can be set on any window, and deeply nested collections of windows may take several rounds of [update idletasks] for them to be laid out correctly (in this case, it is because [update idletasks] does not process any idle event handlers registered by idle event handlers that are run during processing, which bounds the amount of work that may be done; if it didn't, Tk would have a trivial denial-of-service attack vulnerability.) The only way to guarantee a correct redraw of all windows is to regularly service the event queue fully (e.g. with [update], [vwait] or [tkwait].) If you don't do this, you cannot guarantee that all potentially pending redraws occur. End Of Story.
- login: "dkf"
- mimetype: "text/plain"
- title changed to: "[update idle] fails to redraw tk windows"
- username: "dkf"