Fix AUI repaint cascade, refcount input filter, log silent exceptions#408
Merged
realcarbonneau merged 1 commit intomasterfrom Mar 13, 2026
Merged
Fix AUI repaint cascade, refcount input filter, log silent exceptions#408realcarbonneau merged 1 commit intomasterfrom
realcarbonneau merged 1 commit intomasterfrom
Conversation
Replace the rebuild_guard context manager with a self-contained 3-layer architecture in treectrl/frame: 1. Paint suppression: suppress ALL tree paints during refresh with empty PaintDC (breaks the self-sustaining AUI cascade where each 280ms tree paint triggers GDK damage → child repaint → repeat). One clean Refresh() fires when __refreshing clears. 2. Per-widget idle lifecycle: each RefreshAllItems binds its own EVT_IDLE handler that monitors _dirty + one extra cycle, then clears __refreshing and releases the input filter. 3. Refcounted EventFilter: each widget acquire()s on rebuild start and release()s on idle completion. Last widget triggers a 1s deferred deactivation to cover the post-rebuild settling period. Also: - Remove rebuild_guard from viewer.refresh() and CalendarViewer.reconfig() - Remove dead code: rebuild_guard, _rebuild_guard_state, idle handler, contextmanager import from frame.py - Log all silent 'except RuntimeError: pass' via DEAD-OBJ prefix - Harden log_step() for Windows consoles (UnicodeEncodeError) - Replace em-dash with ASCII dash in log messages for portability - Use nonlocal instead of dict hack in sash throttle closure - Update LIST_MANAGEMENT.md with current architecture and 12 failed approaches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the rebuild_guard context manager with a self-contained 3-layer architecture in treectrl/frame:
Paint suppression: suppress ALL tree paints during refresh with empty PaintDC (breaks the self-sustaining AUI cascade where each 280ms tree paint triggers GDK damage → child repaint → repeat). One clean Refresh() fires when __refreshing clears.
Per-widget idle lifecycle: each RefreshAllItems binds its own EVT_IDLE handler that monitors _dirty + one extra cycle, then clears __refreshing and releases the input filter.
Refcounted EventFilter: each widget acquire()s on rebuild start and release()s on idle completion. Last widget triggers a 1s deferred deactivation to cover the post-rebuild settling period.
Also:
Error on startup with new installation on Windows #406