@lyyn@mastodon.ml @tbernard@mastodon.social @drq@mastodon.ml @neilsardesai@mastodon.social it would be impossible without a compositor, in an old school xorg setup / windows pre-aero etc. Any compositor has access to all the buffers submitted by clients, that's how it… well… composes them. Of course drawing is very optimized; there's even damage tracking to only redraw little parts of the windows that changed. But such a "screenshot" functionality doesn't have anything to do with what's drawn on screen, it would just access the sources of what was composited onto the screen.
I've actually built that (without assembling into a layered image editor file…) for Weston way back when haha