Enable use of scap for screen capture on Wayland
This commit is contained in:
parent
3538538562
commit
e095f83d2a
1 changed files with 5 additions and 13 deletions
|
@ -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<anyhow::Result<Vec<Box<dyn crate::ScreenCaptureSource>>>>
|
||||
{
|
||||
// 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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue