slint
slint copied to clipboard
A way to set app_id on Wayland is needed
On Wayland the set_app_id request in xdg shell allows to set the desktop file name for an app: https://wayland.app/protocols/xdg-shell#xdg_toplevel:request:set_app_id
Setting the right value here is important for desktop apps, for a number of reasons. See https://nicolasfella.de/posts/importance-of-desktop-file-mapping/ for details on that.
Slint should expose a way to set this app id, similar to QGuiApplication::setDesktopFileName()
There is some discussion in the now closed PR #1333. The question is whether this should be:
- a property on the Window element in the .slint file
- Or an API on the slint::Window in the programming language
- Or an API to set this globally for the application.
In the mean time, it is possible to do that using private API (workaround)
Is it possible to use this workaround in the node api ?
I realize that adding API on slint::Window is "too late", as by the time we access the Window, the underlying window is already registered to the windowing system, while the winit API requires the xdg app id to be stored in the window attributes before creating it.