From 8e334d3bfd0f0d3fa34eb79e37fdb7dcf63d64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20D=C3=A9murg=C3=A9?= Date: Fri, 12 Nov 2021 11:57:03 +0100 Subject: [PATCH] Added app_id on wayland client --- client/Wayland/wlfreerdp.c | 2 ++ uwac/include/uwac/uwac.h | 8 ++++++++ uwac/libuwac/uwac-window.c | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/client/Wayland/wlfreerdp.c b/client/Wayland/wlfreerdp.c index 90f6a1ede..514352084 100644 --- a/client/Wayland/wlfreerdp.c +++ b/client/Wayland/wlfreerdp.c @@ -227,6 +227,7 @@ static BOOL wl_post_connect(freerdp* instance) wlfContext* context; rdpSettings* settings; char* title = "FreeRDP"; + char* app_id = "wlfreerdp"; UINT32 w, h; if (!instance || !instance->context) @@ -268,6 +269,7 @@ static BOOL wl_post_connect(freerdp* instance) UwacWindowSetFullscreenState(window, NULL, instance->context->settings->Fullscreen); UwacWindowSetTitle(window, title); + UwacWindowSetAppId(window, app_id); UwacWindowSetOpaqueRegion(context->window, 0, 0, w, h); instance->update->BeginPaint = wl_begin_paint; instance->update->EndPaint = wl_end_paint; diff --git a/uwac/include/uwac/uwac.h b/uwac/include/uwac/uwac.h index dae21582a..81e832440 100644 --- a/uwac/include/uwac/uwac.h +++ b/uwac/include/uwac/uwac.h @@ -570,6 +570,14 @@ extern "C" */ UWAC_API void UwacWindowSetTitle(UwacWindow* window, const char* name); + /** + * Sets the app id of the UwacWindow + * + * @param window the UwacWindow + * @param app_id app id + */ + UWAC_API void UwacWindowSetAppId(UwacWindow* window, const char* app_id); + /** Dispatch the display * * @param display The display to dispatch diff --git a/uwac/libuwac/uwac-window.c b/uwac/libuwac/uwac-window.c index b5e2c95c3..7de1d35f9 100644 --- a/uwac/libuwac/uwac-window.c +++ b/uwac/libuwac/uwac-window.c @@ -816,3 +816,9 @@ void UwacWindowSetTitle(UwacWindow* window, const char* name) else if (window->shell_surface) wl_shell_surface_set_title(window->shell_surface, name); } + +void UwacWindowSetAppId(UwacWindow* window, const char* app_id) +{ + if (window->xdg_toplevel) + xdg_toplevel_set_app_id(window->xdg_toplevel, app_id); +}