mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Support WAYLAND_SOCKET in winit backend
I know of a single compositor that supports `WAYLAND_SOCKET` but not `WAYLAND_DISPLAY`: https://gitlab.freedesktop.org/mstoeckl/windowtolayer This should also make niri more robust against accidentally setting `WAYLAND_SOCKET` when starting as a session, before programs could fail if they preffered `WAYLAND_SOCKET` over `WAYLAND_DISPLAY`
This commit is contained in:
committed by
Ivan Molodetskikh
parent
0bd6df507b
commit
c523c80598
+3
-2
@@ -547,8 +547,9 @@ impl State {
|
||||
|
||||
let config = Rc::new(RefCell::new(config));
|
||||
|
||||
let has_display =
|
||||
env::var_os("WAYLAND_DISPLAY").is_some() || env::var_os("DISPLAY").is_some();
|
||||
let has_display = env::var_os("WAYLAND_DISPLAY").is_some()
|
||||
|| env::var_os("WAYLAND_SOCKET").is_some()
|
||||
|| env::var_os("DISPLAY").is_some();
|
||||
|
||||
let mut backend = if headless {
|
||||
let headless = Headless::new();
|
||||
|
||||
Reference in New Issue
Block a user