Only accessing wayland when wayland is enabled

This commit is contained in:
Jonathan Johnson 2024-05-01 12:12:39 -07:00
parent afcae2d4c0
commit 14a2957d6c
No known key found for this signature in database
GPG key ID: A66D6A34D6620579

View file

@ -405,9 +405,9 @@ impl<Message> Windows<Message> {
.with_window_icon(attrs.window_icon)
.with_theme(attrs.preferred_theme);
#[cfg(any(target_os = "linux", target_os = "windows"))]
#[cfg(any(all(target_os = "linux", feature = "wayland"), target_os = "windows"))]
if let Some(app_name) = &attrs.app_name {
#[cfg(target_os = "linux")]
#[cfg(all(target_os = "linux", feature = "wayland"))]
{
builder = winit::platform::wayland::WindowAttributesExtWayland::with_name(
builder, app_name, "",