Open zierf opened 2 months ago
Quick update, the window title (not application name!) set in Python seems to be adopted.
At least it appears in the window frame when the window is not maximized.
I've been playing around a bit with the settings of the Application Title Bar, which until recently was set to Application Name for me. This means that, for example, only "Firefox Developer Edition" is displayed instead of the entire window title, which usually contains the title of a website, or only "Dolphin" instead of "/home/USER/path - Dolphin".
If I were to change the setting to Generic Application Name or Decoration, the title would also be adopted in the system bar.
This means that the icon and the actual application name are missing, not the window title.
The bigger problem seems to be the missing global menu under Wayland, while at the same time the menu in the window is no longer displayed. I still don't understand why it can be loaded correctly when running under XWayland and not under Wayland itself, even while using KDE, Pyside6 should actually be well supported too.
I can confirm this also happens with Fedora Workstation 40.
Can confirm this also happens on Arch linux running KDE Plasma 6 (wayland)
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
```SH $> ./TagStudio.sh [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip [ResourceManager] 4 resources registered [QT DRIVER] Config File not specified, defaulting to /home/USERNAME/.config/TagStudio/TagStudio.ini qt.qpa.wayland: EGL not available Calling NavForward with Content:False, Index:0, PageCount:0 [ENTRY PANEL] UPDATE WIDGETS ([]) [LIBRARY] Extension list loaded in 0.000 seconds [LIBRARY] Tags loaded in 0.000 seconds [LIBRARY] Entries loaded in 0.001 seconds [LIBRARY] Collations loaded in 0.000 seconds [ENTRY PANEL] UPDATE WIDGETS ([]) Query:, Frame: 0, Length: 140 Calling NavForward with Content:(Branch main (Commit #cb4798b)
```SH $> tagstudio [ResourceManager] 4 resources registered [QT DRIVER] Config File not specified, defaulting to /home/USERNAME/.config/TagStudio/TagStudio.ini No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available. Failed to initialize QMediaPlayer "Not available" Failed to create QVideoSink "Not available" Calling NavForward with Content:False, Index:0, PageCount:0 [ENTRY PANEL] UPDATE WIDGETS ([]) [LIBRARY] Extension list loaded in 0.000 seconds [LIBRARY] Tags loaded in 0.000 seconds [LIBRARY] Entries loaded in 0.001 seconds [LIBRARY] Collations loaded in 0.000 seconds [ENTRY PANEL] UPDATE WIDGETS ([]) Query:, Frame: 0, Length: 140 Calling NavForward with Content:(