Bound GTK subtree observers during launcher searches #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/box-8-subtree-watch-growth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the reproducible search failure investigated under BOX-8 in Breadway/breadbox#1.
ListBox sorting reports existing rows as removed and added. The theme binding registered duplicate child observers for those rows, exhausted GLib weak references, and retained its observer registry through callback cycles. Reading child-model items during the intermediate sort also produced an invalid GObject reference.
Keep one observer per widget, capture the registry weakly, disconnect handlers when it is released, and coalesce child changes into one reconciliation after the tree settles. Dynamic descendants still receive the bound theme.
Verification:
This is a shared-crate fix. The user's installed binaries and desktop configs were not changed, and no release tag was created. Breadbox consumes this through its existing dependency-main development checks and a future dependency release. The test demonstrates a concrete failure path for the reported symptom; real Hyprland acceptance remains part of review, using an isolated session.
Independent review of shared BOX-8 fix, PR #52
Acceptance interpretation: (1) a row reorder must not accumulate duplicate subtree observers or exhaust GLib weak references; (2) removed/reparented widgets must release observers and callback ownership; (3) descendants added after binding must still receive the bound theme.
The registry and per-widget live weak-reference check are in
bread-theme/src/gtk.rs:437-454; callbacks weakly capture the registry and coalesce reconciliation until after sorting atgtk.rs:455-483. Dropping a watch disconnects its model handler atgtk.rs:219-224. The regression tests atgtk.rs:874-949assert observer counts stay stable through 200 sorts and reparenting, registry/model release, and late descendant observation. The independent headless Sway input run recorded in BOX-8 confirms 50 type/erase/arrow cycles with fatal GLib criticals enabled and no warning. The current PR head8a3df5f9f367f3e58e940ab014501720bb8e1c39has green CI and is mergeable.This is a concrete fix for the reproduced search failure. It does not prove every intermittent Hyprland symptom is gone; isolated real-Hyprland acceptance remains outstanding. The bread-ecosystem release maintainer must land the shared crate change and bakery must ship it before the installed breadbox path can be considered complete. No merge or release attempted.