1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Fixed name of Win32 cursor tracking flag.

This commit is contained in:
Camilla Berglund 2015-07-07 11:45:53 +02:00
parent f825af06f0
commit bfe55118dd
2 changed files with 5 additions and 5 deletions

View File

@ -151,7 +151,7 @@ typedef struct _GLFWwindowWin32
{ {
HWND handle; HWND handle;
GLboolean cursorInside; GLboolean cursorTracked;
GLboolean iconified; GLboolean iconified;
// The last received cursor position, regardless of source // The last received cursor position, regardless of source

View File

@ -475,7 +475,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
window->win32.cursorPosX = x; window->win32.cursorPosX = x;
window->win32.cursorPosY = y; window->win32.cursorPosY = y;
if (!window->win32.cursorInside) if (!window->win32.cursorTracked)
{ {
TRACKMOUSEEVENT tme; TRACKMOUSEEVENT tme;
ZeroMemory(&tme, sizeof(tme)); ZeroMemory(&tme, sizeof(tme));
@ -484,7 +484,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
tme.hwndTrack = window->win32.handle; tme.hwndTrack = window->win32.handle;
TrackMouseEvent(&tme); TrackMouseEvent(&tme);
window->win32.cursorInside = GL_TRUE; window->win32.cursorTracked = GL_TRUE;
_glfwInputCursorEnter(window, GL_TRUE); _glfwInputCursorEnter(window, GL_TRUE);
} }
@ -493,7 +493,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
case WM_MOUSELEAVE: case WM_MOUSELEAVE:
{ {
window->win32.cursorInside = GL_FALSE; window->win32.cursorTracked = GL_FALSE;
_glfwInputCursorEnter(window, GL_FALSE); _glfwInputCursorEnter(window, GL_FALSE);
return 0; return 0;
} }
@ -1196,7 +1196,7 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
if (_glfw.cursorWindow == window && if (_glfw.cursorWindow == window &&
window->cursorMode == GLFW_CURSOR_NORMAL && window->cursorMode == GLFW_CURSOR_NORMAL &&
window->win32.cursorInside) window->win32.cursorTracked)
{ {
if (cursor) if (cursor)
SetCursor(cursor->win32.handle); SetCursor(cursor->win32.handle);