-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Consider defaulting to X11 when running in Wayland #305
Description
I've been recently playing around with working on some projects based on winit, and as I use wayland as my primary window manager, I've been finding it frustrating.
Currently every one of my programs, before initializing winit, runs code like the following to force disable the wayland backend, and I have to manually disable it when running programs made by others:
fn avoid_winit_wayland_hack() {
std::env::set_var("WINIT_UNIX_BACKEND", "x11");
}This is because the wayland backend is broken to the point where it is unusable even for basic projects. Window resizing doesn't work correctly, the window doesn't size correctly, and often I end up rendering outside of the window borders. In contrast the X backend works perfectly fine.
I'd like to suggest defaulting the WINIT_UNIX_BACKEND to x11 until the wayland backend is closer to feature parity with x11. We should still allow selecting the wayland backend when possible with an environment variable, but when possible we would prefer the x11 one to provide a stable and usable experience by default.