This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix Windows clipboard handling #17706
Merged
stuartmorgan-g
merged 2 commits into
flutter:master
from
stuartmorgan-g:windows-clipboard-fix
Apr 15, 2020
Merged
Fix Windows clipboard handling #17706
stuartmorgan-g
merged 2 commits into
flutter:master
from
stuartmorgan-g:windows-clipboard-fix
Apr 15, 2020
Conversation
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
Fixes several bugs in the clipboard code, and makes some structural improvements: - Adds scoped wrappers for clipboard open/close and global lock/unlock, to prevent missing cleanup, fixing at least one case where the lock was not released. - Adds the relevant window handle to the clipboard calls, since the docs suggest that some operations won't work without one. - Adds a missing clear step to setting the clipboard data. - Switches from TEXT to UNICODETEXT to handle non-ASCII text correctly. - To enable that, adds UTF-16/-8 conversion utilities built on the Win32 APIs (rather than the deprecated std::codecvt functions, as have been previously used in the engine). - Fixes handling of getting data when the clipboard is empty, correctly returning null. - Passes more errors back through the method channel, with details, for easier debugging of future issues. Fixes flutter/flutter#54226
chinmaygarde
approved these changes
Apr 14, 2020
goderbauer
pushed a commit
to goderbauer/engine
that referenced
this pull request
Apr 16, 2020
Fixes several bugs in the clipboard code, and makes some structural improvements: - Adds scoped wrappers for clipboard open/close and global lock/unlock, to prevent missing cleanup, fixing at least one case where the lock was not released. - Adds the relevant window handle to the clipboard calls, since the docs suggest that some operations won't work without one. - Adds a missing clear step to setting the clipboard data. - Switches from TEXT to UNICODETEXT to handle non-ASCII text correctly. - To enable that, adds UTF-16/-8 conversion utilities built on the Win32 APIs (rather than the deprecated std::codecvt functions, as have been previously used in the engine). - Fixes handling of getting data when the clipboard is empty, correctly returning null. - Passes more errors back through the method channel, with details, for easier debugging of future issues. Fixes flutter/flutter#54226
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 16, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes several bugs in the clipboard code, and makes some structural
improvements:
to prevent missing cleanup, fixing at least one case where the lock
was not released.
suggest that some operations won't work without one.
Win32 APIs (rather than the deprecated std::codecvt functions, as
have been previously used in the engine).
returning null.
easier debugging of future issues.
Fixes flutter/flutter#54226