Improve cursor clipping logic (fix after alt+tab and confine to game window in Editor)

#691
This commit is contained in:
Wojtek Figat
2022-07-17 00:09:59 +02:00
parent fe0e24357a
commit 7f3a32a69b
7 changed files with 65 additions and 69 deletions

View File

@@ -537,6 +537,8 @@ void WindowBase::Hide()
{
if (!_visible)
return;
EndClippingCursor();
EndTrackingMouse();
_visible = false;
_showAfterFirstPaint = _settings.ShowAfterFirstPaint;
Hidden();
@@ -560,7 +562,6 @@ void WindowBase::Close(ClosingReason reason)
}
// Close
EndTrackingMouse();
Hide();
OnClosed();
}