The clipboard functions don’t seem to be implemented appropriately on X11/Linux. They use X11’s “primary” buffer which is traditionally used for copying merely by selecting text and then pasting with a middle click. Most programs are probably going to want to implement copy-paste in a manner recognized across a range of systems - clicking on the “copy” menu option (or pressing ctrl+c) to copy and then clicking on the “paste” menu option (or pressing ctrl+v) to paste. X11 does provide this using the “clipboard” buffer.
I’ve filed a bug report along with a patch to fix this here: http://bugzilla.libsdl.org/show_bug.cgi?id=1599 - my patch makes it so that SDL_SetClipboardText() sets both the “primary” and “clipboard” buffers and SDL_GetClipboardText() reads from the “clipboard” buffer. I think this provides most of the correct behavior without any changes to the nice, simple SDL API.
Any comments, other ideas or suggestions on this are welcome. (Note I’m not subscribed to the mailing list so please include me in any replies).
Thanks,
David