fix(taskbar): fall back to application name for windows with no title - #4487
Merged
Merged
Conversation
Collaborator
|
Thanks |
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.
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_titleis set tofalse.TaskModel::displayNameholds the desktop entry name, anddisplayTitle()resolves title, then display name, then app id.TaskModel::titleitself 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_titleis a request a client may never make, and thetitleevent 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
Testing
Commands
119/120 pass, including
taskbar_widget.The one failure is unrelated:
It also fails on main, and this change doesn't touch any UPower code.
Manual
setTitle()now shows its application name instead of a blank label.Manual Coverage
Screenshots / Videos
Before
After
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.docs/user/when this PR changes documented behavior or configuration, or this PR does not require documentation changes.assets/translations/en.json, or this PR adds no new user-facing strings.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,
displayNamestays empty and the app id is used, which matches the behavior without this change.