Work around unreliable clipboard on Linux.

Most likely SDL_waylandvideo.c is to blame, but I don't know enough to
rule out SDL_x11video.c.
This commit is contained in:
Joseph Cloutier
2022-06-07 13:36:35 -04:00
parent 238428c7ea
commit f14dfc8462

View File

@@ -56,6 +56,14 @@ class Clipboard
#if (flash || js || html5)
__update();
#elseif linux
// Hack: SDL won't start calling __update until set_text()
// is called once.
if (_text == null)
{
__update();
set_text(_text);
}
#end
return _text;