-
Notifications
You must be signed in to change notification settings - Fork 505
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
8281384: Random chars on paste from Windows clipboard #1724
Closed
+9
−2
Closed
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c686954
JDK-8281384: Random chars on paste from Windows clipboard
Schmidor e8b8dd6
check both UTF16 bytes
Schmidor 57dcbed
search NUL terminator in native code
Schmidor 56e75dd
cleanup
Schmidor 6ef3353
format and unneeded var removed
Schmidor c91ab3b
remove non unicode textformats
Schmidor 7330b8d
readding flavors with changed mapping
Schmidor 7a0a3b7
Merge remote-tracking branch 'remotes/origin/master' into JDK-8281384
Schmidor 3a4eb33
revert to original mime types
Schmidor 337a67f
explicit break
Schmidor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like those changes made JFX unaware of text data ready to be pasted from "outside" - running your test program and trying to paste something to a TextBox (ex. in
HelloTextBoxClipboard
) doesn't work anymore (Paste popup menu option is disabled, Ctrl+V does nothing, whereas both were possible to do on master). I checked that these mime stuff changes are at fault.My guess now would be that these mime_stuff changes have to be reverted and the actual change should happen as we request Clipboard data - probably a condition changing clipboard format
cf
fromCF_TEXT
andCF_OEMTEXT
toCF_UNICODETEXT
right before we callme.Load()
inPopMemory()
. Please check if that is in fact the case before committing though, I'm not 100% sure if that would work.If that works, a comment explaining why we do this clipboard format swap would also come in handy for future generations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't check if replacing cf with CF_UNICODETEXT there works, as probably that flavor is already always prioritized.
My test for the early NUL terminator explicitly only sets CF_TEXT, but is converted to unicode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did give it some tries and it did indeed seem to prioritize
CF_UNICODETEXT
. I suspect we could leave it be without any extra conditions or changes then.Let's revert the mime_stuff changes then, because they do break something, and then leave it as it is.