mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Wayland: Fix partial writes of clipboard string
The string pointer used to write the contents of our clipboard data offer was never updated, causing it to repeat parts of the beginning of the string until the correct number of bytes had been written.
This commit is contained in:
parent
738b1c73b5
commit
4c110bba41
|
@ -313,6 +313,7 @@ information on what to include when reporting a bug.
|
||||||
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
|
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
|
||||||
`glfwGetClipboardString`
|
`glfwGetClipboardString`
|
||||||
- [Wayland] Bugfix: Data source creation error would cause double free at termination
|
- [Wayland] Bugfix: Data source creation error would cause double free at termination
|
||||||
|
- [Wayland] Bugfix: Partial writes of clipboard string would cause beginning to repeat
|
||||||
- [POSIX] Removed use of deprecated function `gettimeofday`
|
- [POSIX] Removed use of deprecated function `gettimeofday`
|
||||||
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
||||||
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
||||||
|
|
|
@ -1591,7 +1591,7 @@ static void dataSourceHandleSend(void* data,
|
||||||
const char* mimeType,
|
const char* mimeType,
|
||||||
int fd)
|
int fd)
|
||||||
{
|
{
|
||||||
const char* string = _glfw.wl.clipboardSendString;
|
char* string = _glfw.wl.clipboardSendString;
|
||||||
size_t len = strlen(string);
|
size_t len = strlen(string);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -1631,6 +1631,7 @@ static void dataSourceHandleSend(void* data,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
len -= ret;
|
len -= ret;
|
||||||
|
string += ret;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user