Fix: Win32 no longer hides cursor when hovering title bar, keeping in line with behaviour of other platforms.
This commit is contained in:
parent
4043f71156
commit
86672a3724
@ -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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user