[Bug]: Wayland missing menu, application icon and title #415
Labels
Priority: Low
Doesn't require immediate attention
System: Linux
For Linux/BSD distributions
Type: Bug
Something isn't working as intended
Type: Installation
Installing, building, and/or launching the program
Checklist
TagStudio Version
main #cb4798b AND Alpha v9.4
Operating System & Version
NixOS 24.11 (Vicuna), 24.11.20240818.8a33541 | nixpkgs-unstable#8a33541 | KDE
Description
TagStudio does not display the global menu, appropriate icon or title under Wayland.
The entire menu is also missing if the desktop environment uses global menus (also called appmenu or dbus-menu). The menu is then neither displayed in the window itself nor in the global menu.
This means that the application is not usable at all.
Apart from NixOS, I also verified this on a Debian virtual machine with the pre-built
Alpha v9.3.2
release, and it behaves the same there.Apparently Wayland needs a suitable
.desktop
file to display the correct title and icon. Just like someone referenced here with app.setDesktopFileName("myapp") to set a system icon.See also this C++ example. You could possibly use something similar in the
tagstudio/src/qt/ts_qt.py
file.Just for fun, I tried to use the icon for KDE-Discover, which has a
.desktop
file on the system. This actually made the icon and title match.The global menu should have been supported by QT6 applications by now, and this is also the case with normal KDE applications. Here is an old KDE Bug #448078 (and his sibling KDE Bug #455155) about it that has been marked as resolved.
Interestingly, if you start the application with XWayland instead of directly in Wayland, the icon and global menu suddenly work. This can be overridden with the environment variable QT_QPA_PLATFORM.
So if you start the application with
QT_QPA_PLATFORM=xcb tagstudio
or alternatively by setting the variable inflake.nix
beforehand, the correct icon and the global menu appear. The title is apparently not set correctly, in this case it just says Desktop instead on my system.It would therefore make sense to initially move XWayland before Wayland in the
flake.nix
environment variable, which should then provide a menu for most users.Alternatively, you would have to explicitly disable the global menu by deactivating the native menu bar in Python. This means that the menu is always displayed directly in the window itself, but is then no longer integrated into the system as desired.
I hope that someone can find a solution for the missing menu under Wayland that does not require XWayland to be preferred or the native/global menu to be deactivated. Unfortunately, I have no idea whether it is due to a bug in the PySide6 library itself or whether NixOS cannot recognize it correctly due to an extra Python layer in front of the QT6 framework. It wants to register a menu in DBUS, but it's just not visible.
Expected Behavior
Correct title, icon and at least a usable menu, while a global menu is preferred.
Steps to Reproduce
Logs
Branch Alpha-v9.4
Branch main (Commit #cb4798b)
The text was updated successfully, but these errors were encountered: