diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rs index 57d1dcec04..4f9b089615 100644 --- a/crates/gpui/src/platform/linux/wayland/client.rs +++ b/crates/gpui/src/platform/linux/wayland/client.rs @@ -68,7 +68,6 @@ use super::{ display::WaylandDisplay, window::{ImeInput, WaylandWindowStatePtr}, }; - use crate::platform::{PlatformWindow, blade::BladeContext}; use crate::{ AnyWindowHandle, Bounds, Capslock, CursorStyle, DOUBLE_CLICK_INTERVAL, DevicePixels, DisplayId, @@ -666,7 +665,7 @@ impl LinuxClient for WaylandClient { #[cfg(feature = "screen-capture")] fn is_screen_capture_supported(&self) -> bool { - false + true } #[cfg(feature = "screen-capture")] @@ -674,17 +673,10 @@ impl LinuxClient for WaylandClient { &self, ) -> futures::channel::oneshot::Receiver>>> { - // TODO: Get screen capture working on wayland. Be sure to try window resizing as that may - // be tricky. - // - // start_scap_default_target_source() - let (sources_tx, sources_rx) = futures::channel::oneshot::channel(); - sources_tx - .send(Err(anyhow::anyhow!( - "Wayland screen capture not yet implemented." - ))) - .ok(); - sources_rx + // todo! Try window resizing as that may have unexpected results. + crate::platform::scap_screen_capture::start_scap_default_target_source( + &self.0.borrow().common.foreground_executor, + ) } fn open_window(