Skip to content

fix(taskbar): fall back to application name for windows with no title - #4487

Merged
ItsLemmy merged 2 commits into
noctalia-dev:mainfrom
Cocowhal:taskbar-title-fallback
Sep 26, 2026
Merged

ItsLemmy merged 2 commits into
noctalia-dev:mainfrom
Cocowhal:taskbar-title-fallback

Conversation

@Cocowhal

@Cocowhal Cocowhal commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The taskbar now falls back to the application name when a window reports no title, instead of rendering an empty label.

Untitled items now identify themselves on hover instead of showing nothing, even when show_window_title is set to false.

TaskModel::displayName holds the desktop entry name, and displayTitle() resolves title, then display name, then app id. TaskModel::title itself is untouched, since it controls window and workspace matching.

Motivation

A window title is optional in both xdg-shell and wlr-foreign-toplevel-management. xdg_toplevel.set_title is a request a client may never make, and the title event fires only when a title changes, so a client that never sets one never triggers it. A taskbar reading that protocol has to expect an absent title.

Some windows report no title at all or a title that is only whitespace. The check is for a blank title rather than an empty one so both are covered.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Testing

Commands

  • just format
  • just build release
  • just test release

119/120 pass, including taskbar_widget.

The one failure is unrelated:

118/120 noctalia:upower_charge_limit_integration          FAIL            1.35s   (exit status 139 or signal 11 SIGSEGV)
>>> MALLOC_PERTURB_=237 MESON_TEST_ITERATION=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /usr/bin/dbus-run-session -- sh -c 'export DBUS_SYSTEM_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS"; exec "$1"' sh /home/matti/Documents/noctalia/build-release/upower_charge_limit_integration_test

It also fails on main, and this change doesn't touch any UPower code.

Manual

  • Steam, which reports no title, now shows "Steam" in the taskbar and in its tooltip.
  • A Java window that never calls setTitle() now shows its application name instead of a blank label.

Manual Coverage

  • Tested on Niri
  • Tested on Umbriel
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

Before

image

After

image

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.

Additional Notes

The KDE branch resolves the desktop entry separately, since its tasks come from workspace assignments rather than from the resolved running app list.

I couldn't test the KDE branch, since I do not run Plasma. If the desktop entry lookup finds nothing there, displayName stays empty and the app id is used, which matches the behavior without this change.

@ItsLemmy

Copy link
Copy Markdown
Collaborator

Thanks

@ItsLemmy
ItsLemmy merged commit b874356 into noctalia-dev:main Sep 26, 2026
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.

2 participants