Skip to content

fix(clipboard): recover the paste target after panel activation - #54

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/clipboard-paste-target-recovery
Sep 10, 2026
Merged

fix(clipboard): recover the paste target after panel activation#54
github-actions[bot] merged 1 commit into
mainfrom
fix/clipboard-paste-target-recovery

Conversation

@zibo-chen

Copy link
Copy Markdown
Contributor

When the clipboard panel or another ArcRelay window is frontmost, pasting currently fails with no external paste target before the panel has a chance to relinquish keyboard focus. Record the invoking application before showing the panel, capture the recipient before preparing content, and restore it once after releasing panel focus, following PasteGroup’s focus handoff sequence.

Wait for the native panel to stop being key and for the recipient to remain frontmost for 50 ms. Preserve cancellation when content preparation changes the target, the clipboard changes, or focus moves elsewhere during restoration. Keep pinned panels visible and clear the saved invocation when the panel is recreated or opened for a new session.

Validation: seven focus handoff regression tests passed without injecting keystrokes; cargo fmt --all -- --check, cargo check --workspace --all-targets, cargo clippy -p arcrelay-desktop --all-targets --no-deps -- -D warnings, and the developer-facing source language check passed against the latest integration revisions. Real editor insertion and signed application acceptance still need macOS UI verification.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval for an allowlisted maintainer. Required CI, CodeQL, and branch protections still apply.

@github-actions
github-actions Bot enabled auto-merge (squash) September 9, 2026 23:49
@github-actions
github-actions Bot merged commit 2eb6d0c into main Sep 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant