Add an API for taking screenshots and recording screencasts
Submitted by Christian Stadelmann
Assigned to Wayland bug list
Description
Currently, some wayland compositors have their own screenshot and/or screencast feature, such as weston. Others, such as gnome-shell, have an additional public DBus API [1]. For KWin, a similar feature is in the works [2].
This situation is bad because it looks like application developers need to write a separate implementation for their tools for every desktop shell / environment. For the sake of simplicity, can you please add one API (probably an extension to the wayland protocol) for all desktop environments?
[1] https://git.gnome.org/browse/gnome-shell/tree/data/org.gnome.Shell.Screencast.xml [2] https://blog.martin-graesslin.com/blog/2016/11/from-window-killing-to-screenshot/
Some notes:
- Taking screenshots and recording screencasts should be an optional feature.
- The wayland compositor should be able to decide (based on rules or user decisions) whether to allow or deny the request. For this, applications need to have a way to provide information about themselves (like application name and icon) and why they want to take a screenshot/screencast.
- Applications must handle being denied to take a screenshot/screencast
- there should be a way to select regions of the screen(s) only. I don't care whether this should be implemented on client or server (compositor) side.