A want to write simple tool that will take screenshots at Wayland. Am I right with my understanding that it would be completely different from Xorg? Could anybody give me any examples?
Alt + PrtSc – Save a screenshot of the current window to Pictures. Ctrl + PrtSc – Copy the screenshot of the entire screen to the clipboard.
Copy only the image of the active window Click the window that you want to copy. Press ALT+PRINT SCREEN. Paste (CTRL+V) the image into an Office program or other application.
Use Type: Color in the wallpaper settings to get a white background. By default, pressing Shift + Print Screen will directly take a screenshot, without Spectacle popping out.
Yes screenshotting works completely different under wayland than under Xorg.
By design, Wayland is a lot more secure than X11 and does not allow one application to capture the content of other applications' windows, meanignath a X11 based screenshot tool cannot work underWayland/Xwayland.
https://bugs.freedesktop.org/show_bug.cgi?id=98672
Sorry I cannot tell you how it is different, just that it is different.
Your question is a bit underspecified. You don't need to write a tool as long as you use the reference compositor Weston
for Wayland
. It has this feature built in. You can use Super + S
to take a screenshot and Super + R
to record a video in *.wcap
form which you can then convert to a *.webm
video.
If you should really be interested in writing such a tool then you should look at Weston
's source code here: http://cgit.freedesktop.org/wayland/weston and find the relevant parts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With