Conversation
everyx
force-pushed
the
guarantee-last-icon-paint
branch
2 times, most recently
from
September 17, 2026 01:29
da81c03 to
a34580a
Compare
Pixmap-based StatusNotifierItems that update in bursts, or that re-register (sleep/resume, app or shell restarts), can leave the tray with a blank slot that never heals and logs nothing: if the settled fetch is undisplayable -- an empty pixmap because the signal arrived before the data, or a failed Get during re-registration flicker -- no later signal ever repaints it. Fresh registrations hit the same hole at first paint, when the name and object exist before the app populates its pixels. Observed instance: WeChat, China's national-level Qt chat app, is pixmap-only (empty IconName). It fires NewIcon bursts while its IconPixmap flaps between the real icon and fully transparent 16x16 frames; after sleep/resume it re-registers under a new bus name and first-paints before its pixels land. Fix with delivery guarantee, under these principles: - Faithful renderer: any pixels the app exports are painted as-is, however suspicious (even fully transparent). Guessing intent at this layer breaks real apps (cf. fcitx5's deliberate transparent overlay, upstream ubuntu#468). Transparent overlays are never touched. - Exception fallback only: keep the old icon solely when there is literally nothing to display (empty/failed/malformed fetch). - Last-wins delivery: after a refresh leaves a base icon family (Icon/AttentionIcon) undisplayable, re-fetch with bounded backoff once the burst settles (350ms, 2s, 8s; max 3 attempts). Also covered is the first paint of fresh registrations, via the ready-transition hook. Generation-guarded and bounded, so a stale retry can never overwrite newer state (the ubuntu#663/ubuntu#664 race class). AttentionIcon participates only while NeedsAttention; an empty attention icon is otherwise healthy. Refs ubuntu#468 (pixmap/content duality), ubuntu#663/ubuntu#664 (async icon loading races).
everyx
force-pushed
the
guarantee-last-icon-paint
branch
from
September 24, 2026 06:18
a34580a to
564e444
Compare
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.
Pixmap-based StatusNotifierItems that update in bursts, or that re-register (sleep/resume, app or shell restarts), can leave the tray with a blank slot that never heals and logs nothing: if the settled fetch is undisplayable -- an empty pixmap because the signal arrived before the data, or a failed Get during re-registration flicker -- no later signal ever repaints it. Fresh registrations hit the same hole at first paint, when the name and object exist before the app populates its pixels.
Observed instance: WeChat, China's national-level Qt chat app, is pixmap-only (empty IconName). It fires NewIcon bursts while its IconPixmap flaps between the real icon and fully transparent 16x16 frames; after sleep/resume it re-registers under a new bus name and first-paints before its pixels land.
Fix with delivery guarantee, under these principles:
Refs #468 (pixmap/content duality), #663/#664 (async icon loading races).