Skip to content

Ensure clipboard data is shared in the format Windows expects #10284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

zmb3
Copy link
Collaborator

@zmb3 zmb3 commented Feb 10, 2022

Notably: line endings must be CRLF, and the strings must be
null-terminated.

We convert from LF to CRLF endings when pasting on Windows, but we don't
do any conversion in the other direction (CRLF copied on a remote
desktop will be sent directly to the user's workstation unmodified).

Updates #9980

@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from dbbd0ee to 8ddcfd5 Compare February 10, 2022 23:28
Copy link
Contributor

@jimbishopp jimbishopp left a comment

Choose a reason for hiding this comment

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

Looks good (I think). I don't have much experience with Rust.

@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from 8ddcfd5 to 5d5aede Compare February 11, 2022 14:55
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from 5d5aede to 0e1bb2c Compare February 11, 2022 15:28
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from 0e1bb2c to d1e87ae Compare February 11, 2022 15:32
@zmb3 zmb3 enabled auto-merge (squash) February 11, 2022 15:34
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from d1e87ae to 5383f7b Compare February 11, 2022 15:59
Copy link
Contributor

@ibeckermayer ibeckermayer left a comment

Choose a reason for hiding this comment

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

Unit tests for the CRLF conversion would be nice to have if that piece can be easily unit tested.

@zmb3 zmb3 disabled auto-merge February 11, 2022 16:40
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch 2 times, most recently from 8aad396 to 6ac328c Compare February 11, 2022 17:03
@zmb3 zmb3 requested a review from ibeckermayer February 11, 2022 17:03
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from 6ac328c to 4e3e99e Compare February 11, 2022 17:16
Notably: line endings must be CRLF, and the strings must be
null-terminated.

We convert from LF **to** CRLF endings when pasting on Windows, but we don't
do any conversion in the other direction (CRLF copied on a remote
desktop will be sent directly to the user's workstation unmodified).
@zmb3 zmb3 force-pushed the zmb3/clipboard-null-terminate branch from 4e3e99e to b68c556 Compare February 11, 2022 17:36
@zmb3 zmb3 enabled auto-merge (squash) February 11, 2022 17:36
@zmb3 zmb3 merged commit a846382 into master Feb 11, 2022
@zmb3 zmb3 deleted the zmb3/clipboard-null-terminate branch February 11, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants