Skip to content

Issue #4009, enables option to capture cursor in screenshot (Windows)

Nikc requested to merge (removed):win-capture-pointer into master

This patch ports the existing "Include mouse pointer" option for Screenshots to Windows. It affects the "Take a screenshot of a single window" and "Take a screenshot of the entire screen" actions.

For single windows, it conditionally applies the "MS_SHOWMAGNIFIEDCURSOR" flag to CreateWindow () in the doCaptureMagnificationAPI () function, if the user wants the cursor to show up.

For the entire screen, it uses DrawIcon () in the primDoWindowCapture () function to draw the cursor over the captured image, again conditionally if the user wants the cursor to show up.

The current screenshot-win32.c file on gimp-2-10 is virtually identical to master excluding a few unrelated datatype changes, so if approved this should be very easy to port to that branch as well.

Tested on Windows 10, Gimp 2.10.30.

Merge request reports