SUMMARY *** The user has to define which element want to selected. What if you can do the other way around. Click print and than Spectacle show you: - desktop background - desktop widgets - each application window - mouse hover and you can show/hide each elemente like you did in an gimp/krita by turn layer on/off. In addition you can export this layered image to gimp/krita/... and postedit the screenshot. *** The first step would be to save not only a screenshot (stupid image) from whatever the user seleceted. Spectacle save each element (app window, wallpaper, ...) as an image layer and by export the image to an application that know layers like gimp/krita/... the "stupid" image was an image with layers where you can postprocess the image. Also Annotations would be a separate layer so it will be easier to edit there something.
The main issue is, that .png didn't offer layers by default.
This would be super cool. It reminds me of GammaRay and Firefox's screenshot tool. I kind of doubt we could get it to work with individual UI elements like Firefox. Unlike the web where everything mostly boils down to HTML, JavaScript and CSS, there are multiple GUI toolkits that are used in desktop environments. Supporting all of the most common ones, or even just Qt, would probably also require depending on private library code, which is part of how GammaRay is able to work. Some of what you mentioned is already possible to take exact screenshots of using Active Window or Window Under Cursor, though not currently in the integrated workflow you seem to be thinking of. A UI that can interactively let you add windows, context menus, applet popups and the desktop is certainly something I'd like to add to Spectacle, although I think for wayland, the UI might need to be handled by KWin rather than Spectacle due to technical reasons (we'll see). I'm not sure what can be done for X11, but considering how much more permissive it is, I don't see why it couldn't be done. Maybe it could also allow grabbing panels and plasma widgets on the desktop separately from the desktop (as you seem to be requesting in item 2), though not sure about that last one.
Actually, I wonder if there's some way we could use accessibility infrastructure to get UI elements from within a UI, regardless of toolkit as long as it has basic accessibility support?
KWin knows what a window is, which is something we can count on. So at a minimum, we could implement "pick a window" mode. Then we could collapse Active Window and Window Under Cursor mode into that, and be left with only three modes for the single-monitor use case: - Full screen - Pick a region of the screen - Pick a window
*** Bug 472410 has been marked as a duplicate of this bug. ***
Snipaste (https://www.snipaste.com/) implements this in fine-grain with Accessibility API on Windows. Perhaps something similar could be done on KDE?