-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Clipboard API missing temporal order #8338
Comments
Ideas on how to solve this:
|
Good point, thanks for the feedback! |
Took a deeper look, because the primary selection feature is somewhat broken on X11. Further, primary selection does not work for most apps I care about (terminals like |
You mention that all the sets are external. Isn't it the operating systems's job to clear out stale clipboard data? On Windows, this is delegated to applications: they must call Unless SDL is somehow caching the clipboard content (that would be really inefficient). |
External applications, and also SDL can and will set different data for different mimetypes for what the user sees as a single clip on the board. Copying image data usually sets png, jpg, bmp and other formats, each technically being their own. Now you can mix in text in there, on linux there is also a selection clipboard, that works the same but should not be touched and continue to be valid when other mimetypes are set. |
Everything you said is correct and makes sense (and helped me understand what the primary selection text is), but it doesn't address my question. |
Yes, but mime types are not that portable for these purposes. Take images for example, Windows and MacOS have their own internal formats for clipboard and DnD (CF_DIB and NSImage serialization). MSPaint will put CF_DIB into clipboard. What mime type you will use to get that? Check this |
Fixed! |
The current, new clipboard api with added support for types other than text is a really good thing.
But, it lacks info on what was set last. eg:
(assume set is externally)
-> no issue yet, we only know of text
-> now both, text and file are set, with no way to know what was the last copy, so we cant know , whether we should paste the file or the text.
-> same issue, but now text would be the correct answer.
The text was updated successfully, but these errors were encountered: