From a201fd46bd0549655b85bcd6e609fdabd1add837 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 31 Mar 2020 09:39:11 +0000 Subject: make remote wayland device optional --- src/main.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 36f3881..7ea2e01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -871,6 +871,15 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument:: } cfg.wayland_socket_paths.insert(name.to_string(), path); } + "wayland-device-sock" => { + let path = PathBuf::from(value.unwrap()); + if cfg.remote_wayland_device_socket_path.is_some() { + return Err(argument::Error::TooManyArguments(String::from( + "wayland device socket already supplied", + ))); + } + cfg.remote_wayland_device_socket_path = Some(path); + } #[cfg(feature = "wl-dmabuf")] "wayland-dmabuf" => cfg.wayland_dmabuf = true, "x-display" => { @@ -1446,9 +1455,7 @@ Possible key values: Argument::value("x-display", "DISPLAY", "X11 display name to use."), Argument::flag( "display-window-keyboard", - "\ -Capture keyboard input from the display window. -", + "Capture keyboard input from the display window.", ), Argument::flag( "display-window-mouse", @@ -1470,6 +1477,11 @@ Path to the Wayland socket to use. The unnamed one is used for displaying virtual screens. Named ones are only for IPC. ", ), + Argument::value( + "wayland-device-sock", + "PATH", + "Path to a remote crosvm Wayland device to use.", + ), #[cfg(feature = "wl-dmabuf")] Argument::flag( "wayland-dmabuf", -- cgit 1.4.1