fix(notifications): report a version in GetServerInformation#890
Open
UfukUstali wants to merge 1 commit into
Open
Conversation
UfukUstali
added a commit
to UfukUstali/caelestia-shell
that referenced
this pull request
Jul 10, 2026
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.
Problem
The freedesktop notifications
GetServerInformationmethod returns an empty version string:The third field (the server version) is empty.
NotificationServer::GetServerInformationsources it fromQCoreApplication::applicationVersion(), butmain()only ever callssetApplicationName("quickshell")and never sets the application version, soapplicationVersion()returns an empty string.This isn't purely cosmetic: some clients treat a notification server with missing/empty server information as incomplete or non-conformant. For example, Chrome checks the server info when deciding whether to route native notifications through the freedesktop server, and an empty version can cause it to reject quickshell as a usable notification target. This results in Chrome creating it's own windows as a fallback mechanism for notifications.
Fix
Set the application version from the already-available
QS_VERSIONmacro inmain(), right after the application name is set.build.hpp(which definesQS_VERSION) is already included bymain.cpp, so this is self-contained.After the change,
GetServerInformationreturns the real version:Testing
Verified
GetServerInformationover D-Bus now reports the version string instead of an empty field and Chrome notifications working.Notes
I used plain
QS_VERSIONrather than the richerQS_VERSION " (revision " GIT_REVISION ...)format fromdebuginfo.cpp, to keep the D-Bus version field to a clean semver value — happy to switch to the fuller format if you'd prefer consistency with the debug output.