Merge branch 'Tryibion-windows-hide-cursor'
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)
|
||||
|
||||
@@ -28,6 +28,7 @@ private:
|
||||
bool _isSwitchingFullScreen = false;
|
||||
bool _trackingMouse = false;
|
||||
bool _clipCursorSet = false;
|
||||
bool _lastCursorHidden = false;
|
||||
bool _isDuringMaximize = false;
|
||||
Windows::HANDLE _monitor = nullptr;
|
||||
Windows::LONG _clipCursorRect[4];
|
||||
@@ -90,7 +91,7 @@ public:
|
||||
private:
|
||||
|
||||
void CheckForWindowResize();
|
||||
void UpdateCursor() const;
|
||||
void UpdateCursor();
|
||||
void UpdateRegion();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user