SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Support X11 incremental clipboard transfers

Open raiguard opened this issue 5 months ago • 2 comments

In our game, copy/pasting very large strings is relatively common, as users can share "blueprint strings" that can grow to be several megabytes large. I attempted to change our codebase to rely on SDL's clipboard functions in lieu of our custom implementations, but that made users unable to paste large blueprint strings on X11.

Some investigation has revealed the existence of the INCR mechanism in X11 to transfer large selections in the clipboard. Our custom X11 clipboard code implements this, but it appears that the SDL X11 clipboard does not, meaning that if this mechanism is used, pasting into the SDL application will not work. I would love it if this could be supported so I can fully rely on the SDL clipboard functions in the future!

Attached below is the problematic string.

huge-blueprint.txt

raiguard avatar Jan 18 '24 18:01 raiguard