X11: Fix setting the clipboard string to itself
From upstream: 0c27ed1d0e.
This commit is contained in:
parent
c51f4df0ca
commit
f8ae048d60
1 changed files with 2 additions and 1 deletions
3
glfw/x11_window.c
vendored
3
glfw/x11_window.c
vendored
|
|
@ -2735,8 +2735,9 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor UNUSED)
|
|||
|
||||
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 a new issue