Bug 368433 - Dynamically add/remove pointer after screenshot is taken
Summary: Dynamically add/remove pointer after screenshot is taken
Status: RESOLVED INTENTIONAL
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-08 05:23 UTC by Damian Nowak
Modified: 2019-06-12 02:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damian Nowak 2016-09-08 05:23:20 UTC
Whether to include a mouse pointer or not has to be decided before taking a screenshot. This is inconvenient because one can forget to enable/disable pointer, take a screenshot, realize they forgot to set it, and take a screenshot once again. Spectacle could take two screenshots, one with a pointer, one without, and then dynamically switch between the time when I enable/disable the checkbox. When I click Save or Copy to clipboard, a screenshot with a pointer is copied if "show pointer" checkbox is enabled at a time of clicking the button, and a screenshot without a pointer is copied if "show pointer" checkbox is disabled at a time of clicking the button.

Reproducible: Always
Comment 1 Christoph Feck 2016-09-09 00:26:08 UTC
Actually the cursor/pointer image is already composed over the grabbed screen shot (but before saving), so there is no need to grab twice.
Comment 2 Boudhayan Gupta 2019-06-11 23:39:08 UTC
Damian, your use case is valid, but the approach suggested won't entirely work.

In X11, we compose the mouse pointer over the image in most cases (except when we invoke KWin to grab an image for us), so we can un-compose the image. However, in Wayland (and that 10% of the time when we invoke KWin under X11), we'll need to take multiple screenshots. Invoking the screenshot API is computationally cheap, but not free, and there will be subtle differences between the two images. Also, multiple images at common but big sizes (think multiple 4K displays) will eat up an incredible amount of memory, all for the difference of a few pixels of difference. Storing image deltas is another idea, but again, a lot of work for very little gain.

Also, this just will never work with the rectangular image cropper on any platform. Given how much refactoring will have to be done and how ugly the result will be (from a code complexity and performance point of view), I really wouldn't want to spend much effort implementing this.
Comment 3 Damian Nowak 2019-06-12 02:01:15 UTC
Thank you for sharing your perspective. If Spectacle ever gets rewritten, I hope this feature gets reconsidered as I believe it's valuable. :) Thank you!