Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add winit's wayland-csd-adwaita feature to Bevy's wayland feature #8722

Merged
merged 1 commit into from
May 31, 2023

Conversation

VitalyAnkh
Copy link
Contributor

@VitalyAnkh VitalyAnkh commented May 31, 2023

Objective

Solution

  • One simple one line solution: Add winit's wayland-csd-adwaita feature to Bevy's wayland feature.

Copied from #3301 (comment):

Investigation

  1. Gnome forced Wayland apps to implement CSD, whether on their own or using some libraries like Gnome's official solution libdecor. Many Linux apps do this with libdecor, like blender, kitty... I think it's not comfortable for Bevy to fix this problem this way.
  2. Winit has support for CSD on wayland(https://github.com/rust-windowing/winit/blob/8bb004a1d9ec1b40cbb9831a6dea774d4b6d6d7b/Cargo.toml#L42), but Bevy disabled Winit's default features, thus no winit's wayland-csd-adwaita feature. And Bevy's wayland feature doesn't include winit's wayland-csd-adwaita feature so users can't get window decorations on Wayland even with Bevy's wayland feature enabled.
  3. Many rust UI toolkit, like iced, doesn't disable winit's wayland-csd-adwaita feature.

Conclusion and one Possible solution

Bevy disabled winit's default features in order to decrease package size. But I think it's acceptable to add winit's wayland-csd-adwaita feature to Bevy's wayland feature gate to fix this issue easily for this only add on crate: sctk-adwaita.

@VitalyAnkh
Copy link
Contributor Author

With this patch, the 3d_scene example looks like this on Gnome Wayland (with native window decorations):
image

@VitalyAnkh VitalyAnkh changed the title Add winit's wayland-csd-adwaita feature to Bevy's wayland feature Add winit's wayland-csd-adwaita feature to Bevy's wayland feature May 31, 2023
@mockersf mockersf added A-Windowing Platform-agnostic interface layer to run your app in O-Linux Specific to the Linux desktop operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels May 31, 2023
@james7132 james7132 added this pull request to the merge queue May 31, 2023
Merged via the queue into bevyengine:main with commit 5b0f21c May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in O-Linux Specific to the Linux desktop operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bevy wayland window name is "Unknown"
3 participants