Fix app icon missing from taskbar on Wayland (e.g. COSMIC)#903
Open
TheCodeSharman wants to merge 1 commit intoDreamSourceLab:masterfrom
Open
Fix app icon missing from taskbar on Wayland (e.g. COSMIC)#903TheCodeSharman wants to merge 1 commit intoDreamSourceLab:masterfrom
TheCodeSharman wants to merge 1 commit intoDreamSourceLab:masterfrom
Conversation
On Wayland (e.g. COSMIC), running apps are matched to their desktop
entry via the Wayland app-id. Qt derives the app-id from
QGuiApplication::desktopFileName() if set, otherwise falls back to the
application name ("DSView"). Since the desktop file is named
"dsview.desktop", the case mismatch prevented COSMIC from matching the
running app to its entry.
Fixed by calling setDesktopFileName("dsview") to explicitly match the
desktop file name. Also moved the desktop file install destination from
the hardcoded /usr/share/applications to the cmake install prefix
(share/applications) for consistency with other installed files.
Added StartupWMClass=DSView for X11 compatibility.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19b44cb to
cc40353
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.
Summary
QApplication::setDesktopFileName("dsview")so the Wayland app-id matches the desktop entry basename, allowing compositors (e.g. COSMIC) to correctly associate the running app with its iconStartupWMClass=DSViewto the desktop file for equivalent X11 window manager matching/usr/share/applicationsto the install-prefix-relativeshare/applications, consistent with all other installed filesBackground
On Wayland, compositors match running apps to their
.desktopentry using the app-id. Qt derives the app-id fromQGuiApplication::desktopFileName(), falling back to the application name ("DSView") if not set. Since the desktop file is nameddsview.desktop, the case mismatch caused the icon to appear in the app launcher (search) but not in the taskbar for running apps.Test plan
🤖 Generated with Claude Code