diff --git a/apps/gridcraft/Cargo.toml b/apps/gridcraft/Cargo.toml index 72f5d0855..572e89fa0 100644 --- a/apps/gridcraft/Cargo.toml +++ b/apps/gridcraft/Cargo.toml @@ -25,9 +25,6 @@ chrono = { workspace = true } # Icon + VERSIONINFO for gridcraft.exe; build.rs only uses it when the target is Windows. winresource = "0.1" -[target.'cfg(all(unix, not(any(target_os = "macos", target_os = "linux"))))'.dependencies] -winit = { version = "0.30", default-features = false, features = ["x11"] } - [target.'cfg(target_os = "linux")'.dependencies] # Retain X11 fallback; draw Wayland client-side controls without bundled title fonts. winit = { version = "0.30", default-features = false, features = ["x11", "wayland-csd-adwaita-notitle"] } diff --git a/apps/gridcraft/src/main.rs b/apps/gridcraft/src/main.rs index f5232b17c..753c868d7 100644 --- a/apps/gridcraft/src/main.rs +++ b/apps/gridcraft/src/main.rs @@ -358,21 +358,11 @@ fn main() -> eframe::Result<()> { } let window_builder = viewport.clone(); let options = eframe::NativeOptions { viewport, ..Default::default() }; - #[cfg(unix)] + #[cfg(target_os = "macos")] let mut options = options; // Intel Macs: Metal's compiler aborts on wgpu's indirect-validation shaders (see graphics.rs). #[cfg(target_os = "macos")] graphics::configure_indirect_validation(&mut options, graphics::skips_indirect_validation(true, cfg!(target_arch = "x86_64"))); - // winit has no file drag-and-drop on Wayland (only on X11), so dropping files from the file - // manager showed a "no" cursor. Run through XWayland when it's there; GRIDCRAFT_WAYLAND=1 - // keeps the native Wayland backend. - #[cfg(all(unix, not(target_os = "macos")))] - if std::env::var_os("DISPLAY").is_some_and(|d| !d.is_empty()) && std::env::var_os("GRIDCRAFT_WAYLAND").is_none() { - options.event_loop_builder = Some(Box::new(|b| { - use winit::platform::x11::EventLoopBuilderExtX11; - b.with_x11(); - })); - } // Before eframe creates the wgpu instance: Windows starts on DirectX 12, or OpenGL when // DirectX 12 has no GPU driver, and never touches Vulkan unless asked (see graphics.rs). #[cfg(target_os = "windows")]