Repository navigation
feat: drag between windows and apps - #52
Merged
Merged
Conversation
iamnbutler
force-pushed
the
feat/drag-across
branch
from
October 17, 2026 02:48
1f6a157 to
af2df95
Compare
This was referenced Oct 17, 2026
Merged
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.
Adds drags into another window or app:
desktop_draggains an optionalto_snapshot.Behavior
to_snapshot: unchanged exact-window background drag.to_snapshot:fromis a point insnapshotandtois a point in the other window'sto_snapshot. Exact-window delivery can't leave its window, so this uses the approved foreground path:exposeshelper from feat: hover and press-and-hold #45). If not, refuse before any input.moveMouseWithOutcometo the start point (200 ms), then the globaldragWithOutcome(.linear; default 800 ms; steps = duration/16, clamped to 10…120; left or right button).unknownwithDESKTOP_ACTION_UNVERIFIED. The message says the real pointer moved and the source app may have come forward, and asks the agent to inspect both windows. The result includesdestination_receiptandpointer_moved.unknown, and errors before it arerefused. If the second lease fails, the first is released.allowedOperationsgains.drag.Patch
peekaboo-drag-settle.patch(end of the stack):GestureService.playDragPathposted mouse-down and the first drag event back to back, then released immediately on the last point, so AppKit drag sessions often never start or the destination never accepts the drop.defer, so cancellation releases the button.Only the global drag uses this path; the exact-window drag doesn't.
Overlay
Upstream already sends
showMouseMovementfor the hover andshowSwipeGesturefor the drag, so the agent cursor glides to the start and draws the trail.Tests
npm run checkto_snapshotequal tosnapshotis refused, as are identical points withoutto_snapshot(TypeScript). Unknown snapshots are refused natively on the cross-window path before input.Pending: screen locked
The screen is locked (
IOConsoleLocked), sodesktop_inspectcan't capture. Run these with the dev app:desktop_dragfrom the file icon to the TextEdit text area withto_snapshot. Expectunknownandpointer_moved: true, with the file's name or contents inserted in TextEdit.to→refused, and the pointer doesn't move.refused.desktop_dragwithin one window still behaves as before (it doesn't use the patched path).