fix: set Wayland application ID (#34855)

* refactor: extract XDG app ID logic into a method

* fix: set application ID on Wayland
This commit is contained in:
Valentin Hăloiu 2022-07-11 21:26:18 +03:00 committed by GitHub
parent 8f3fb8db09
commit f63bba8ce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 8 deletions

View file

@ -51,6 +51,7 @@
#include "shell/browser/ui/views/client_frame_view_linux.h"
#include "shell/browser/ui/views/frameless_view.h"
#include "shell/browser/ui/views/native_frame_view.h"
#include "shell/common/platform_util.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#include "ui/views/window/native_frame_view.h"
@ -271,6 +272,8 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
// Set WM_CLASS.
params.wm_class_name = base::ToLowerASCII(name);
params.wm_class_class = name;
// Set Wayland application ID.
params.wayland_app_id = platform_util::GetXdgAppId();
auto* native_widget = new views::DesktopNativeWidgetAura(widget());
params.native_widget = native_widget;