Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to set app_id on Wayland is needed #1332

Closed
nicolasfella opened this issue Jun 10, 2022 · 3 comments · Fixed by #6851
Closed

A way to set app_id on Wayland is needed #1332

nicolasfella opened this issue Jun 10, 2022 · 3 comments · Fixed by #6851
Labels
a:platform-linux issue specific to Linux, X11 or wayland (mO,bT) enhancement New feature or request

Comments

@nicolasfella
Copy link

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 added a commit to nicolasfella/slint that referenced this issue Jun 10, 2022
On Wayland this will be passed to set_app_id in xdg-shell

On X11 this will be passed to wmclass

It is used by desktop environments to identify the application

Fixes slint-ui#1332
@hunger hunger added enhancement New feature or request a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) labels Jul 18, 2023
@ogoffart ogoffart added a:platform-linux issue specific to Linux, X11 or wayland (mO,bT) and removed a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) labels Jul 18, 2023
@ogoffart ogoffart added priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this and removed priority:low Lowest priority. The issue is kept open for tracking purpose, but noone is actively working on this labels Jan 19, 2024
@ogoffart
Copy link
Member

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)

@sigmaSd
Copy link
Contributor

sigmaSd commented Oct 18, 2024

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

@tronical
Copy link
Member

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 added a commit that referenced this issue Nov 20, 2024
ChangeLog: Added function to set the XDG app id on Wayland/X11. This needs to be added with respective function names in the language sections.

Fixes #1332
tronical added a commit that referenced this issue Nov 20, 2024
ChangeLog: Added function to set the XDG app id on Wayland/X11. This needs to be added with respective function names in the language sections.

Fixes #1332
tronical added a commit that referenced this issue Nov 21, 2024
ChangeLog: Added function to set the XDG app id on Wayland/X11. This needs to be added with respective function names in the language sections.

Fixes #1332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:platform-linux issue specific to Linux, X11 or wayland (mO,bT) enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants