mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Move Win32 clipboard code to helper window
This commit is contained in:
parent
4cd493dd9a
commit
5c98a44603
@ -1341,7 +1341,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
|||||||
memcpy(GlobalLock(stringHandle), wideString, wideSize);
|
memcpy(GlobalLock(stringHandle), wideString, wideSize);
|
||||||
GlobalUnlock(stringHandle);
|
GlobalUnlock(stringHandle);
|
||||||
|
|
||||||
if (!OpenClipboard(window->win32.handle))
|
if (!OpenClipboard(_glfw.win32.helperWindow))
|
||||||
{
|
{
|
||||||
GlobalFree(stringHandle);
|
GlobalFree(stringHandle);
|
||||||
free(wideString);
|
free(wideString);
|
||||||
@ -1361,7 +1361,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
{
|
{
|
||||||
HANDLE stringHandle;
|
HANDLE stringHandle;
|
||||||
|
|
||||||
if (!OpenClipboard(window->win32.handle))
|
if (!OpenClipboard(_glfw.win32.helperWindow))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to open clipboard");
|
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to open clipboard");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user