Now I need to develop a plug-in that can take screenshots on Ubuntu, CentOS and fedora. I try to write it in Xlib. It can run on Ubuntu and CentOS, but Fedora uses Wayland, and the plug-in that I developed can't work.
Gnome screenshot can work on these platforms, but after reading his source code, I found that it can achieve screenshots by calling other processes, which is hard for me to learn from.
So is there any way I can take a screenshot on Wayland engine?