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

Wayland: SDL_SetClipboardText doesn't work #12152

Open
GoaLitiuM opened this issue Feb 1, 2025 · 1 comment
Open

Wayland: SDL_SetClipboardText doesn't work #12152

GoaLitiuM opened this issue Feb 1, 2025 · 1 comment
Milestone

Comments

@GoaLitiuM
Copy link

Using the testclipboard sample and replacing the SDL_SetClipboardData call with SDL_SetClipboardText("Hello world?"); produces random garbage when trying to read the clipboard content from another application, or most often it just returns STRING as content instead. Using SDL_SetClipboardData with text/plain mime type works as expected though.

@slouken slouken added this to the 3.2.4 milestone Feb 1, 2025
@GoaLitiuM
Copy link
Author

It looks like the SDL_SetClipboardData cleanup callback is called before anything tries to access the clipboard data, resulting in garbage data from freed data when the data callback is issued. The clipboardtest sample seems to only work because the cleanup callback was not provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants