Add API to set the XDG app id

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
This commit is contained in:
Simon Hausmann 2024-11-20 15:23:11 +00:00 committed by Simon Hausmann
parent 10edaaa7f1
commit 1888e58735
11 changed files with 102 additions and 1 deletions

View file

@ -1522,4 +1522,13 @@ void blocking_invoke_from_event_loop(Functor f)
# endif
#endif
/// Sets the application id for use on Wayland or X11 with
/// [xdg](https://specifications.freedesktop.org/desktop-entry-spec/latest/) compliant window
/// managers. This must be set before the window is shown.
inline void set_xdg_app_id(const SharedString &xdg_app_id)
{
private_api::assert_main_thread();
cbindgen_private::slint_set_xdg_app_id(&xdg_app_id);
}
} // namespace slint