mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
X11: Fix setting the clipboard string to itself
(cherry picked from commit 0c27ed1d0e
)
This commit is contained in:
parent
3604cc72fc
commit
1d711057a1
@ -2950,8 +2950,9 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
|||||||
|
|
||||||
void _glfwPlatformSetClipboardString(const char* string)
|
void _glfwPlatformSetClipboardString(const char* string)
|
||||||
{
|
{
|
||||||
|
char* copy = _glfw_strdup(string);
|
||||||
free(_glfw.x11.clipboardString);
|
free(_glfw.x11.clipboardString);
|
||||||
_glfw.x11.clipboardString = _glfw_strdup(string);
|
_glfw.x11.clipboardString = copy;
|
||||||
|
|
||||||
XSetSelectionOwner(_glfw.x11.display,
|
XSetSelectionOwner(_glfw.x11.display,
|
||||||
_glfw.x11.CLIPBOARD,
|
_glfw.x11.CLIPBOARD,
|
||||||
|
Loading…
Reference in New Issue
Block a user