Change Wayland app_id to net.ankiweb.Anki #3396
Closed
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.
Anki's icon is not displayed when Anki is running on KDE Plasma 6 on Wayland. Instead of displaying the correct icon, Plasma instead defaults to a generic Wayland icon. This was originally reported on the forums and was initially thought to be a Flatpak bug. However, after some investigation, I believe that this is related to Plasma instead. Plasma expects the Wayland app_id to be set according to the reverse domain standard, which it currently is not (the current value is
anki.desktop
). I've been able to confirm the same behaviour for both the git main repo and the official Anki 24.06.3 Qt6 build running on Plasma 6.1.4 as well. GNOME seems to be more forgiving with the Wayland app_id, which is probably why this problem only occurs on Plasma.This PR fixes this by setting the Wayland app_id to
net.ankiweb.Anki
and renaminganki.desktop
. I've also updated the install and uninstall scripts with the renamed .desktop file, as well as the changed StartupWMClass value. Please see the KDE Community Wiki for details. However, I'm not sure if this is best way to handle the renamed .desktop file. Would it be a good idea to add a check to the install script in order to delete the oldanki.desktop
file if it exists? Will my small change to the uninstall script be enough?The following warning would be resolved as well:
Qt warning: QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix
I've tested this on Plasma 6.1.4 running on both X11 and Wayland, and on GNOME 46. The only problem I've ran into is the window decorations when building from source on GNOME. I can see the same behaviour when building from source without making any changes, so perhaps this is to be expected in this case?
Official Anki 24.06.3 Qt6 build
Building from source
Oh, and one last thing. I've made one minor contribution before and forgot to add myself to
qt/aqt/about.py
. Would it be appropriate to do so with this PR?