Added app_id on wayland client

This commit is contained in:
Guillaume Démurgé 2021-11-12 11:57:03 +01:00
parent 8c1fb86f6f
commit eaae90998c
3 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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);
}