nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
https://docs.rs/xcap
Apache License 2.0
491 stars 58 forks source link

support wlroots based compositors #68

Closed c-h-johnson closed 1 year ago

c-h-johnson commented 1 year ago

Use libwayshot to get a screenshot using the wlroots protocol. This is required for the library to work on sway for example.

Currently it only tries it if all other methods fail, but it could be possible to detect if wlroots is being used and therefore try it first.