Skip to content

fix(launcher): resolve window provider icons via desktop entry - #4279

Open
TheSkyentist wants to merge 1 commit into
noctalia-dev:mainfrom
TheSkyentist:fix/launcher-window-provider-icons
Open

fix(launcher): resolve window provider icons via desktop entry#4279
TheSkyentist wants to merge 1 commit into
noctalia-dev:mainfrom
TheSkyentist:fix/launcher-window-provider-icons

Conversation

@TheSkyentist

@TheSkyentist TheSkyentist commented Sep 4, 2026

Copy link
Copy Markdown

Summary

The launcher's window provider (/win) passes the raw Wayland app id straight into the icon theme lookup. When an app's app id doesn't match its icon name, that lookup misses and the result falls back to the generic window glyph. makeResult() now resolves the app id to a desktop entry via app_identity::findDesktopEntry() and uses its Icon= key, with an internal apps branch and a raw app id fallback so the rest of the provider is untouched.

Motivation

I ran into this with Zed: its window shows the default icon in the launcher's window list, but the correct icon everywhere else (taskbar, dock, app launcher). dev.zed.Zed.desktop has Icon=zed, the Wayland app id is dev.zed.Zed, and the icon on disk is zed.png, so resolve("dev.zed.Zed") finds nothing.

Going through past issues and PRs, this is the same class of bug as #2337 (inconsistent missing icons in dock / active window vs app launcher), which was fixed by routing app id to desktop entry resolution through app_identity. The taskbar, dock, active window widget and window switcher all go through that path already; the window provider was added later (#2884) and never got wired up to it. This applies the existing approach in the one place it was still missing.

Type of Change

  • Bug fix

Related Issue

Related to #2337.

Testing

just format (clang-format v22) clean. Built with meson setup --buildtype=debug + ninja: 0 warnings, all 796 targets link. meson test: 111/111 pass (no dedicated test exists for the window provider). Ran the built binary in place of my installed shell and confirmed Zed now shows its real icon in /win where it previously showed the generic glyph.

Manual Coverage

  • Tested on Niri

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I updated user-facing documentation in docs/user/ when this PR changes documented behavior or configuration, or this PR does not require documentation changes.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

🤖 Generated with Claude Code

The window provider fed the raw Wayland app id straight into the icon
theme lookup, so an app whose app id differs from its icon name (for
example "dev.zed.Zed" against the "zed" icon) fell back to the generic
window glyph in the launcher, even though its icon showed fine in the
taskbar, dock and app launcher.

The taskbar, dock, active window widget and window switcher all resolve
the app id to a desktop entry through app_identity before the icon
lookup. This routes the launcher's window provider through the same path,
with internal apps and a raw app id fallback handled the same way.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions
github-actions Bot marked this pull request as draft September 4, 2026 17:29
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

The description now contains the required template structure.

@TheSkyentist
TheSkyentist marked this pull request as ready for review September 4, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant