feat(wayland): Window::SetAppId

xdg_toplevel.set_app_id, so the compositor can match the window to its
.desktop file: the icon, the task switcher, activation.
This commit is contained in:
Jorijn van der Graaf 2026-10-18 01:51:20 +02:00
commit 0d8287c122
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
2 changed files with 9 additions and 0 deletions

View file

@ -620,6 +620,12 @@ void Window::SetTitle(const std::string_view title) {
#endif
}
void Window::SetAppId(const std::string_view id) {
#ifdef CRAFTER_GRAPHICS_WINDOW_WAYLAND
xdg_toplevel_set_app_id(xdgToplevel, std::string(id).c_str());
#endif
}
void Window::SetTextInput(bool active, std::int32_t x, std::int32_t y, std::int32_t width, std::int32_t height, TextInputPurpose purpose) {
#ifdef CRAFTER_GRAPHICS_WINDOW_WAYLAND
textInputActive_ = active;