-
Notifications
You must be signed in to change notification settings - Fork 920
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
Wayland availability detection does not check for WAYLAND_SOCKET #3459
Comments
I have a feeling that if you set |
While I was testing it, I've discovered that empty The logic in wayland-rs follows the |
opened upstream https://gitlab.freedesktop.org/wayland/wayland/-/issues/438 |
Wayland clients have two methods of connecting to the compositor. If the environment variable WAYLAND_DISPLAY is set, they can connect() to the Unix socket at a path indicated by WAYLAND_DISPLAY. A much rarer case is when the environment variable WAYLAND_SOCKET is set; then the compositor will have provided one end of a socket pair through file descriptor inheritance, and the value of WAYLAND_SOCKET will indicate the file descriptor ID.
Currently,
winit
when autodetecting which backend to use only checks for WAYLAND_DISPLAY, not WAYLAND_SOCKET. (The code that does this check is in src/platform_impl/linux/mod.rs .) It should consider the Wayland backend to be usable if either of WAYLAND_DISPLAY or WAYLAND_SOCKET is available.To test this, run a program using winit under a compositor or tool that provides a Wayland connection using WAYLAND_SOCKET. (The way I ran into this issue was with the command
waypipe
--oneshot ssh localhost
alacritty
.)The text was updated successfully, but these errors were encountered: