mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Fixed name of Win32 cursor tracking flag.
This commit is contained in:
parent
f825af06f0
commit
bfe55118dd
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user