mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-22 18:28:52 -05:00
X11: Fix setting the clipboard string to itself
This commit is contained in:
parent
d1ae7bac60
commit
0c27ed1d0e
|
@ -2997,8 +2997,9 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
|||
|
||||
void _glfwPlatformSetClipboardString(const char* string)
|
||||
{
|
||||
char* copy = _glfw_strdup(string);
|
||||
free(_glfw.x11.clipboardString);
|
||||
_glfw.x11.clipboardString = _glfw_strdup(string);
|
||||
_glfw.x11.clipboardString = copy;
|
||||
|
||||
XSetSelectionOwner(_glfw.x11.display,
|
||||
_glfw.x11.CLIPBOARD,
|
||||
|
|
Loading…
Reference in New Issue
Block a user