Enable use of scap for screen capture on Wayland

This commit is contained in:
Michael Sloan 2025-04-04 14:15:10 -06:00
parent 3538538562
commit e095f83d2a
No known key found for this signature in database

View file

@ -68,7 +68,6 @@ use super::{
display::WaylandDisplay, display::WaylandDisplay,
window::{ImeInput, WaylandWindowStatePtr}, window::{ImeInput, WaylandWindowStatePtr},
}; };
use crate::platform::{PlatformWindow, blade::BladeContext}; use crate::platform::{PlatformWindow, blade::BladeContext};
use crate::{ use crate::{
AnyWindowHandle, Bounds, Capslock, CursorStyle, DOUBLE_CLICK_INTERVAL, DevicePixels, DisplayId, AnyWindowHandle, Bounds, Capslock, CursorStyle, DOUBLE_CLICK_INTERVAL, DevicePixels, DisplayId,
@ -666,7 +665,7 @@ impl LinuxClient for WaylandClient {
#[cfg(feature = "screen-capture")] #[cfg(feature = "screen-capture")]
fn is_screen_capture_supported(&self) -> bool { fn is_screen_capture_supported(&self) -> bool {
false true
} }
#[cfg(feature = "screen-capture")] #[cfg(feature = "screen-capture")]
@ -674,17 +673,10 @@ impl LinuxClient for WaylandClient {
&self, &self,
) -> futures::channel::oneshot::Receiver<anyhow::Result<Vec<Box<dyn crate::ScreenCaptureSource>>>> ) -> futures::channel::oneshot::Receiver<anyhow::Result<Vec<Box<dyn crate::ScreenCaptureSource>>>>
{ {
// TODO: Get screen capture working on wayland. Be sure to try window resizing as that may // todo! Try window resizing as that may have unexpected results.
// be tricky. crate::platform::scap_screen_capture::start_scap_default_target_source(
// &self.0.borrow().common.foreground_executor,
// 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
} }
fn open_window( fn open_window(