-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support setting application ID for Wayland #1600
Comments
This would also allow some DEs/WMs to show an icon for the application in various places such as the title bar, if the application has provided desktop configuration files and icons |
The winit API seems to have changed and now uses I hard-coded the application title with
locally and this works in principle. I assume the hard part is to configure this source to only run on Wayland (I'm not sure if this is exposed to the eframe crate as configuration yet). I am also not sure if it is wise to re-use the application title here (which is the same as the application name currently, but will this always be the case?), or if a more specific option e.g. in |
I'm not sure about this either. |
This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland. When no application ID is explicitly set, it defaults to the title of the window.
This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland. When no application ID is explicitly set, it defaults to the title of the window.
This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland. When no application ID is explicitly set, it defaults to the title of the window.
This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland. When no application ID is explicitly set, it defaults to the title of the window.
I added a pull request (#3007) for this, but decided against using the title as default. This would alter the behavior of existing programs, and I am uncertain if there are any limitations to application IDs that would conflict with more "weird" window titles. I used the |
…3007) * Add an optional app_id field to eframe's NativeOptions (#1600). This is used in the window builder to set the application ID, which is e.g. important for a proper configuration in `.desktop` files under Wayland. When no application ID is explicitly set, it defaults to the title of the window. * Only enable NativeOptions::app_id under Linux. The wayland feature is not sufficent as constraint and it won't compile e.g. under Windows. While Wayland could also be used on other Unix-Systems like FreeBSD, this would probably need some specific testing. Winit uses the following definition as "wayland_platform" and on which the required packages are available: > wayland_platform: { all(feature = "wayland", free_unix, not(wasm), not(redox)) }, * Do not use title as default application ID under Wayland. The title might be used to also communicate state (opened file, ...) to the user and this might have unforeseen consequences for the application ID. It seems to be better to use the old behavior of not setting an application ID in this case. Also add an example on how to set the application ID in the documentation. * Avoid as_deref(), which was a left-over of a previous version Co-authored-by: Emil Ernerfeldt <[email protected]> --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
Is your feature request related to a problem? Please describe.
Applications using
egui
on Wayland have their app_id property set asnull
. As far as I can tell there is currently no way to set it.Describe the solution you'd like
I'd like to have the window title to be used as
app_id
for Wayland. This looks to be as simple as calling the WindowBuilder's with_app_id function with the title string as the value.Additional context
Some window managers,
sway
to name one, can make use ofapp_id
value to detect windows of certain applications, and handle those windows in some different manner than others.I'm willing to submit a pull request implementing this if this is something you agree would be an useful feature to have.
The text was updated successfully, but these errors were encountered: