mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-22 06:15:40 +00:00
Store and compare cursor-positions before updating last move time to fix idle-hiding
This commit is contained in:
parent
49574a99f5
commit
fb310d1282
@ -89,6 +89,7 @@ namespace Ryujinx.Ava
|
||||
private float _newVolume;
|
||||
private KeyboardHotkeyState _prevHotkeyState;
|
||||
|
||||
private Point? _lastCursorPoint;
|
||||
private long _lastCursorMoveTime;
|
||||
private bool _isCursorInRenderer = true;
|
||||
private bool _ignoreCursorState = false;
|
||||
@ -221,12 +222,13 @@ namespace Ryujinx.Ava
|
||||
|
||||
if (sender is MainWindow window)
|
||||
{
|
||||
if (ConfigurationState.Instance.HideCursor.Value == HideCursorMode.OnIdle)
|
||||
var point = e.GetCurrentPoint(window).Position;
|
||||
|
||||
if (ConfigurationState.Instance.HideCursor.Value == HideCursorMode.OnIdle && (_lastCursorPoint == null || _lastCursorPoint != point))
|
||||
{
|
||||
_lastCursorMoveTime = Stopwatch.GetTimestamp();
|
||||
}
|
||||
|
||||
var point = e.GetCurrentPoint(window).Position;
|
||||
var bounds = RendererHost.EmbeddedWindow.Bounds;
|
||||
var windowYOffset = bounds.Y + window.MenuBarHeight;
|
||||
var windowYLimit = (int)window.Bounds.Height - window.StatusBarHeight - 1;
|
||||
@ -244,6 +246,7 @@ namespace Ryujinx.Ava
|
||||
!_viewModel.IsSubMenuOpen;
|
||||
|
||||
_ignoreCursorState = false;
|
||||
_lastCursorPoint = point;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user