Repository navigation
Stop advertising system icon roots as the tray icon theme path - #413
Merged
Merged
Conversation
The tray advertised <prefix>/share/icons as its IconThemePath, so a package installed under /usr reported /usr/share/icons. Tray hosts already search that directory, and some index the advertised path recursively: Noctalia walks every installed icon theme each time its tray drawer opens (noctalia-dev/noctalia#4338). - Leave the installed path out when it is the icons directory of a data directory a spec-following host searches: the XDG data home and the system data directories, with the spec defaults and with relative values ignored. Custom prefixes such as /opt and Nix store paths keep advertising their own icons. - Advertise the installed path only while the tray names its symbolic icon. Colored pixmaps need no theme path. - WAYSCRIBER_ICON_THEME_PATH still overrides the path, and an empty value advertises none. docs/CONFIG.md now documents both. Refs #412
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.
Wayscriber's tray item advertised
<prefix>/share/iconsas itsIconThemePath, so an AUR or other/usrinstall reported/usr/share/icons. Tray hosts already search that directory. Noctalia indexes the advertised path with a recursive walk on its render thread and repeats the walk for every new tray widget, so each tray drawer open walks every installed icon theme (noctalia-dev/noctalia#4338; a fix is in progress in noctalia-dev/noctalia#4341). This change stops Wayscriber from triggering it.iconsdirectory of a data directory that a spec-following host searches:XDG_DATA_HOMEandXDG_DATA_DIRS, with the base directory spec defaults and with relative values ignored. Paths are compared after resolving symlinks./usr,/usr/local, and~/.localinstalls advertise nothing. Custom prefixes such as/opt/wayscriberor a Nix store path still advertise their own icons, which fix(tray): harden COSMIC icon fallback #160 added for those installs.WAYSCRIBER_ICON_THEME_PATHstill overrides the advertised path, and an empty value advertises none.docs/CONFIG.mdnow documents the variable and this behavior.The path resolution moves out of
src/daemon/tray/ksni.rsintosrc/daemon/tray/icon_theme_path.rs. The newpaths::searched_data_dirs()reads the XDG data directories.Validation:
git diff --checkpass.-D warningsstops at an existingfetch_updatedeprecation insrc/runtime_ui_state/controller/construction.rs, which is unchanged onmain. With only that lint allowed, it passes with both all features and no default features.--test-threads=1for both all features and no default features. New tests cover a system install withheld directly and through a symlinked data directory, a custom prefix that is still advertised, and the XDG defaults, including a relativeXDG_DATA_HOME.An end-to-end check with Noctalia 5.3.0 on a headless Sway session showed the stall on every tray drawer open with the previous build installed in
/usr/bin, and no stall with this branch. The icon still showed through Noctalia's normal theme lookup. The previous build withWAYSCRIBER_ICON_THEME_PATHset to an empty value gave the same result as this branch. The first open after a cold boot and niri itself were not tested.Refs #412