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

@ -214,3 +214,10 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
}
#[cfg(feature = "esp-backtrace")]
use esp_backtrace as _;
#[no_mangle]
pub unsafe extern "C" fn slint_set_xdg_app_id(_app_id: &SharedString) {
#[cfg(feature = "i-slint-backend-selector")]
i_slint_backend_selector::with_global_context(|ctx| ctx.set_xdg_app_id(_app_id.clone()))
.unwrap();
}