Conversation
When the primary screen (server side) grabs the clipboard, handleClipboardGrabbed only marked ownership and notified other screens to grab — it never read or sent the actual clipboard data. Real data was only transferred during screen switches (switchScreen/onClipboardChanged), so if the user copied text on the server side without moving the mouse to a client screen, remote clients never received the clipboard content. Fix: in handleClipboardGrabbed, when the grabber is the primary client, read the clipboard data via getClipboard and push it to all non-grabber clients via setClipboard. This mirrors the client-side pattern in Client::handleClipboardGrabbed which sends clipboard data immediately when not active. Log: PMS Bug 341993 — 协同后复制文本接收端剪贴板未显示
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates server-side clipboard handling so that when the primary screen grabs the clipboard, it immediately reads and broadcasts the actual clipboard data to all other clients, ensuring remote clipboards stay in sync even without a screen switch. Sequence diagram for updated server clipboard grab handlingsequenceDiagram
participant User
participant PrimaryClient
participant Server
participant OtherClient
User->>PrimaryClient: copy
PrimaryClient->>Server: handleClipboardGrabbed
Server->>PrimaryClient: getClipboard
PrimaryClient-->>Server: clipboard.m_clipboard
Server->>Server: clipboard.m_clipboardData = clipboard.m_clipboard.marshall
loop for each non_grabber client
Server->>OtherClient: setClipboard
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
When the primary screen (server side) grabs the clipboard, handleClipboardGrabbed only marked ownership and notified other screens to grab — it never read or sent the actual clipboard data. Real data was only transferred during screen switches (switchScreen/onClipboardChanged), so if the user copied text on the server side without moving the mouse to a client screen, remote clients never received the clipboard content.
Fix: in handleClipboardGrabbed, when the grabber is the primary client, read the clipboard data via getClipboard and push it to all non-grabber clients via setClipboard. This mirrors the client-side pattern in Client::handleClipboardGrabbed which sends clipboard data immediately when not active.
Log: PMS Bug 341993 — 协同后复制文本接收端剪贴板未显示
Summary by Sourcery
Bug Fixes: