1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Wayland: Fix error paths not closing sending fd

Whatever error happens on our end, we should still close the fd so the
other end can move on.
This commit is contained in:
Camilla Löwy 2022-03-23 20:08:12 +01:00
parent a4460b694e
commit 990dc4b388
2 changed files with 3 additions and 0 deletions

View File

@ -314,6 +314,7 @@ information on what to include when reporting a bug.
`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 - [Wayland] Bugfix: Partial writes of clipboard string would cause beginning to repeat
- [Wayland] Bugfix: Some errors would cause clipboard string transfer to hang
- [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)

View File

@ -1599,6 +1599,7 @@ static void dataSourceHandleSend(void* userData,
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unknown clipboard data source"); "Wayland: Unknown clipboard data source");
close(fd);
return; return;
} }
@ -1606,6 +1607,7 @@ static void dataSourceHandleSend(void* userData,
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Copy requested from an invalid string"); "Wayland: Copy requested from an invalid string");
close(fd);
return; return;
} }