Force windows cursor to show or hide based on cursor hidden value
This commit is contained in:
@@ -770,14 +770,24 @@ void WindowsWindow::CheckForWindowResize()
|
||||
}
|
||||
}
|
||||
|
||||
void WindowsWindow::UpdateCursor() const
|
||||
void WindowsWindow::UpdateCursor()
|
||||
{
|
||||
// Don't hide cursor when window is not focused
|
||||
if (_cursor == CursorType::Hidden && _focused)
|
||||
{
|
||||
if (!_lastCursorHidden)
|
||||
{
|
||||
_lastCursorHidden = true;
|
||||
::ShowCursor(FALSE);
|
||||
}
|
||||
::SetCursor(nullptr);
|
||||
return;
|
||||
}
|
||||
else if (_lastCursorHidden)
|
||||
{
|
||||
_lastCursorHidden = false;
|
||||
::ShowCursor(TRUE);
|
||||
}
|
||||
|
||||
int32 index = 0;
|
||||
switch (_cursor)
|
||||
|
||||
Reference in New Issue
Block a user