slint icon indicating copy to clipboard operation
slint copied to clipboard

A way to set app_id on Wayland is needed

Open nicolasfella opened this issue 3 years ago • 2 comments
trafficstars

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()

nicolasfella avatar Jun 10 '22 12:06 nicolasfella

There is some discussion in the now closed PR #1333. The question is whether this should be:

  1. a property on the Window element in the .slint file
  2. Or an API on the slint::Window in the programming language
  3. Or an API to set this globally for the application.

In the mean time, it is possible to do that using private API (workaround)

ogoffart avatar Aug 20 '24 07:08 ogoffart

Is it possible to use this workaround in the node api ?

sigmaSd avatar Oct 18 '24 09:10 sigmaSd

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.

tronical avatar Nov 20 '24 12:11 tronical