Unify with_app_id and with_class methods

Both APIs are used to set application name. This commit unifies the API
between Wayland and X11, so downstream applications can remove platform
specific code when using `WindowBuilderExtUnix`.

Fixes #1739.
This commit is contained in:
Kirill Chibisov 2022-04-20 01:56:56 +03:00 committed by GitHub
parent bf366cb99d
commit cbba00d360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 36 deletions

View file

@ -159,8 +159,8 @@ impl Window {
window.set_max_size(max_size);
// Set Wayland specific window attributes.
if let Some(app_id) = platform_attributes.app_id {
window.set_app_id(app_id);
if let Some(name) = platform_attributes.name {
window.set_app_id(name.general);
}
// Set common window attributes.