Repository navigation
Capture the cursor at the enlarged pointer size on Windows - #21
Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit intoNov 2, 2026
Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
Conversation
Cursor handles keep their nominal 32 px bitmaps; the system enlarges the pointer only when drawing it, so screenshots and recordings showed the standard-size cursor. Scale the snapshot by the accessibility pointer size (SPI_GETCURSORBASESIZE), preferring the cursor file's larger image, and size the standalone cursor image from the icon instead of a fixed 64 px. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Marc-André Moreau (mamoreau-devolutions)
merged commit Nov 2, 2026
fe2f309
into
master
14 checks passed
Marc-André Moreau (mamoreau-devolutions)
deleted the
copilot/fix-enlarged-cursor-capture
branch
November 2, 2026 02:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User feedback: with an enlarged mouse pointer (Settings > Accessibility > Mouse pointer > Size), recorded video showed the standard-size pointer.
Cause
GetCursorInforeturns cursor handles with their nominal 32 px bitmaps. The system enlarges the pointer only when it draws it, soDrawIconExdrew the small cursor. The standalone cursor image used for cursor-as-object was also hardcoded to a 64 px box, which would cut off larger cursors.Fix (
crates/jiffshot-capture/src/win/screen.rs)SPI_GETCURSORBASESIZE(0x2028, undocumented, default 32). When it's above 32,CursorSnapshot::takecopies the cursor at the larger size withCopyImage(..., LR_COPYFROMRESOURCE)so it uses the cursor file's sharp large image. If that fails, it falls back to a stretched copy. The hotspot comes from the scaled copy.draw_ontodraws at the snapshot's real size, andimage()sizes its frame from the cursor instead of a fixed 64 px.CursorSnapshot.Verification