Repository navigation
feat(kit): Preview::pan_cursors, to keep the arrow over a zoomed image - #2122
Merged
Merged
Conversation
The full-window image preview set the grab and grabbing cursors on its body after the app's hooks, so an app could not keep the arrow there. On by default.
This was referenced Nov 25, 2026
Hona
marked this pull request as ready for review
November 25, 2026 05:58
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.
Compiled
Compiled on Windows x64, Windows arm64, macOS and Linux x64 in anomalyco/opencode-rune#1137, all four build jobs green: the app with Rune pinned to a check commit, the rev the app pins today (
4d8df909) plus this change and the five other cursor changes, cherry-picked. That is this change on the app's rev, not on this branch's base (devis 117 commits past it); everymatchonCursorthatdevhas was checked by reading.Why
The kit's full-window image preview sets
Cursor::Grabon its body when the image is zoomed, andCursor::Grabbingwhile it is dragged. It does so after the app'sPreviewBindhooks have run, so an app cannot take it back. An app that follows a design where a zoomed image keeps the arrow showed the hand there (and on Windows, where winit has no hand forgrab, the four-way move arrows).What changes
Preview::pan_cursors(bool):Dragging pans either way: the cursor is only the hint.
What it can change for an app
Nothing until an app calls
pan_cursors(false).Not run
The new test has not been run: this repo's tests run on the scheduled macOS job, which I read after the merge.
pan_cursors_off_leaves_a_zoomed_image_on_the_arrowcovers a fitted image (the arrow in both), and a zoomed one with the cursors on (Grab) and off (the arrow).