Closed TheJJ closed 9 months ago
This is a feature I have also wanted to implement for a long time, but is sadly hard to implement.
on Wayland, capturing specific client surfaces requires compositor support. The wlroots protocols wlr-screencopy and wlr-export-dmabuf that are currently used by wl-mirror only support whole output or rectangular output region capturing.
The XDG Desktop Portal API for Screensharing does have support for sharing individual windows, as long as the compositor and the portal implementation support it. I have been working on and off on getting support for that into wl-mirror (issue #16), though that has proven to be harder to implement than expected.
With an XDG Portal screenshare backend, single window capturing would automatically be implemented for compositors like Hyprland, KDE, or Gnome. This would not work on sway, since xdg-desktop-portal-wlr does not support single window capturing.
duplicate of #16
(added capturing of single windows as a direct goal task of #16, since it wasn't mentioned directly)
instead of mirroring whole outputs or regions, it would be useful to be able to mirror a client surface.
this would then work similar to a window selection in a browser's screen sharing feature.
my use-case would be mirroring my emacs window (showing slides or code) to the beamer, but not showing everything else which is used as tooling just for me during a lecture.
bonus: with a key combination, change the currenly streamed source client surface - then I could switch from sharing emacs to my browser directly in-place.