diff --git a/src/win32_platform.h b/src/win32_platform.h index 9bb49f16..e8e32dfc 100644 --- a/src/win32_platform.h +++ b/src/win32_platform.h @@ -151,7 +151,7 @@ typedef struct _GLFWwindowWin32 { HWND handle; - GLboolean cursorInside; + GLboolean cursorTracked; GLboolean iconified; // The last received cursor position, regardless of source diff --git a/src/win32_window.c b/src/win32_window.c index bdb3359a..8e65b450 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -475,7 +475,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, window->win32.cursorPosX = x; window->win32.cursorPosY = y; - if (!window->win32.cursorInside) + if (!window->win32.cursorTracked) { TRACKMOUSEEVENT tme; ZeroMemory(&tme, sizeof(tme)); @@ -484,7 +484,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, tme.hwndTrack = window->win32.handle; TrackMouseEvent(&tme); - window->win32.cursorInside = GL_TRUE; + window->win32.cursorTracked = GL_TRUE; _glfwInputCursorEnter(window, GL_TRUE); } @@ -493,7 +493,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_MOUSELEAVE: { - window->win32.cursorInside = GL_FALSE; + window->win32.cursorTracked = GL_FALSE; _glfwInputCursorEnter(window, GL_FALSE); return 0; } @@ -1196,7 +1196,7 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) if (_glfw.cursorWindow == window && window->cursorMode == GLFW_CURSOR_NORMAL && - window->win32.cursorInside) + window->win32.cursorTracked) { if (cursor) SetCursor(cursor->win32.handle);