diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index e4e0dba59..925c2bf4c 100755 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -399,14 +399,8 @@ void WindowImplWin32::setVisible(bool visible) //////////////////////////////////////////////////////////// void WindowImplWin32::setMouseCursorVisible(bool visible) { - // Don't call twice ShowCursor with the same parameter value; - // we don't want to increment/decrement the internal counter - // more than once. - if (visible != m_cursorVisible) - { - m_cursorVisible = visible; - ShowCursor(visible); - } + m_cursorVisible = visible; + SetCursor(m_cursorVisible ? m_lastCursor : NULL); } @@ -422,7 +416,7 @@ void WindowImplWin32::setMouseCursorGrabbed(bool grabbed) void WindowImplWin32::setMouseCursor(const CursorImpl& cursor) { m_lastCursor = cursor.m_cursor; - SetCursor(m_lastCursor); + SetCursor(m_cursorVisible ? m_lastCursor : NULL); } @@ -586,8 +580,9 @@ void WindowImplWin32::processEvent(UINT message, WPARAM wParam, LPARAM lParam) case WM_SETCURSOR: { // The mouse has moved, if the cursor is in our window we must refresh the cursor - if (LOWORD(lParam) == HTCLIENT) - SetCursor(m_lastCursor); + if (LOWORD(lParam) == HTCLIENT) { + SetCursor(m_cursorVisible ? m_lastCursor : NULL); + } break; }