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

[feat] Set GTK Application ID #910

Closed
codifryed opened this issue Apr 28, 2024 · 4 comments · Fixed by #912
Closed

[feat] Set GTK Application ID #910

codifryed opened this issue Apr 28, 2024 · 4 comments · Fixed by #912

Comments

@codifryed
Copy link

Description:

I noticed a few strange quirks with my application and tracked it down to the fact that the Tao library sets the application ID always to None for the GTK implementation and therefor ends up defaulting to the executable's name. (can be verified with wayland_debug=client and changing the binary name). Code reference example:

let app = gtk::Application::new(None, gio::ApplicationFlags::empty());

That sometimes works out, but not always and can lead to conflicts. Additionally the application_id is used for several things depending your one's DE, and as such is recommended to be set per best practice specification:

Gnome/GTK: https://teams.pages.gitlab.gnome.org/Websites/developer.gnome.org/documentation/tutorials/application-id.html#application-id
Wayland: https://wayland.app/protocols/xdg-shell#xdg_toplevel:request:set_app_id
KDE reference: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1317

The GTK rust crate also sets the application_id in it's examples.

Admittedly there may be a good reason Tao does this, but it would be beneficial and helpful to be able to set a proper value.

Solution I'd like:

I would like to be able to set the GTK Application ID. For example perhaps as a new field in the tauri.conf.json or programmatically when instantiating the application, i.e.: app.set_app_id("org.gnome.ThisApp")

@amrbashir
Copy link
Member

Thanks for bringing this to our attention, I will open a PR to expose an API in tao but tauri will probably just set it to the identifier defined in tauri.conf.json without exposing the API.

@codifryed
Copy link
Author

Thanks @amrbashir!

Using the defined identifier in the conf I think is fine. I wasn't originally sure of that option because that's part of the BundleConfig and would then affect a non-bundle setting. Semantics. 😄
Happy to see this set in any regard.

@amrbashir
Copy link
Member

Using the defined identifier in the conf I think is fine. I wasn't originally sure of that option because that's part of the BundleConfig and would then affect a non-bundle setting. Semantics. 😄 Happy to see this set in any regard.

In v2, the identifier was moved to the root of the tauri.conf.json because of things like this.

@codifryed
Copy link
Author

Aha! 👍🏼 nice.

amrbashir added a commit to tauri-apps/tauri that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants