Screenshooting and screencasting
This is just an issue to keep track of prior art and progress of these features in other compositors.
Possible solutions:
- Custom IPC (Sway 0.x)
- D-Bus API (GNOME, KDE) w/ Pipewire
- Wayland protocol (Weston, Orbital - only screenshots)
GNOME and KDE seem to take the Pipewire path with a custom private D-Bus protocol (here and here). They expose a public D-Bus interface via Flatpak's xdg-desktop-portal.
If we want to support screenshooters and screencasters using xdg-desktop-portal, we could implement an xdg-desktop-portal backend out-of-tree which talks to the compositor via IPC or a Wayland protocol.
The most efficient way would be to export dmabufs with GBM and give them to the client. That gives a zero-copy, direct access to GPU resources.
References: