mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Wayland: Simplify clipboard string allocation
This commit is contained in:
@@ -1413,15 +1413,6 @@ int _glfwInitWayland(void)
|
||||
wl_data_device_manager_get_data_device(_glfw.wl.dataDeviceManager,
|
||||
_glfw.wl.seat);
|
||||
wl_data_device_add_listener(_glfw.wl.dataDevice, &dataDeviceListener, NULL);
|
||||
|
||||
_glfw.wl.clipboardSize = 4096;
|
||||
_glfw.wl.clipboardString = _glfw_calloc(_glfw.wl.clipboardSize, 1);
|
||||
if (!_glfw.wl.clipboardString)
|
||||
{
|
||||
_glfwInputError(GLFW_OUT_OF_MEMORY,
|
||||
"Wayland: Failed to allocate clipboard memory");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return GLFW_TRUE;
|
||||
@@ -1513,6 +1504,5 @@ void _glfwTerminateWayland(void)
|
||||
close(_glfw.wl.cursorTimerfd);
|
||||
|
||||
_glfw_free(_glfw.wl.clipboardString);
|
||||
_glfw_free(_glfw.wl.clipboardSendString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user