|
|
@ -1319,6 +1319,7 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor) |
|
|
|
|
|
|
|
|
|
|
|
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) |
|
|
|
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
RECT area; |
|
|
|
POINT pos; |
|
|
|
POINT pos; |
|
|
|
|
|
|
|
|
|
|
|
if (_glfw.cursorWindow != window) |
|
|
|
if (_glfw.cursorWindow != window) |
|
|
@ -1333,6 +1334,13 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) |
|
|
|
if (WindowFromPoint(pos) != window->win32.handle) |
|
|
|
if (WindowFromPoint(pos) != window->win32.handle) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetClientRect(window->win32.handle, &area); |
|
|
|
|
|
|
|
ClientToScreen(window->win32.handle, (POINT*) &area.left); |
|
|
|
|
|
|
|
ClientToScreen(window->win32.handle, (POINT*) &area.right); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!PtInRect(&area, pos)) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (cursor) |
|
|
|
if (cursor) |
|
|
|
SetCursor(cursor->win32.handle); |
|
|
|
SetCursor(cursor->win32.handle); |
|
|
|
else |
|
|
|
else |
|
|
|