Skip to content
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

macOS: Don't clear clipboard in SetText. #12866

Merged
merged 1 commit into from Sep 13, 2023
Merged

Conversation

grokys
Copy link
Member

@grokys grokys commented Sep 12, 2023

What does the pull request do?

Removes a call to Clear() in the unmanaged macOS clipboard code. The macOS managed code is responsible for clearing the clipboard. Clearing it here results in any other data formats that have previously been added by SetBytes being cleared.

For context:

Fixed issues

The managed part is responsible for clearing the clipboard, and does so. In addition, `SetBytes` doesn't clear the clipboard.
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0039392-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@jmacato jmacato added this pull request to the merge queue Sep 12, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 12, 2023
Copy link
Member

@kekekeks kekekeks left a comment

Choose a reason for hiding this comment

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

Make sure that the managed part of IClipboardImpl implementation still clears the clipboard since SetText there is supposed to replace all other formats

@grokys
Copy link
Member Author

grokys commented Sep 13, 2023

Make sure that the managed part of IClipboardImpl implementation still clears the clipboard since SetText there is supposed to replace all other formats

Yep, it seems to - I linked the relevant lines in the description.

@grokys grokys added this pull request to the merge queue Sep 13, 2023
Merged via the queue into master with commit 8432059 Sep 13, 2023
7 checks passed
@grokys grokys deleted the fixes/macos-clipboard-clear branch September 13, 2023 20:18
@grokys grokys added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Sep 29, 2023
grokys added a commit that referenced this pull request Oct 2, 2023
The managed part is responsible for clearing the clipboard, and does so. In addition, `SetBytes` doesn't clear the clipboard.
@grokys grokys added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 14, 2023
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.

None yet

4 participants