mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-22 23:25:46 +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
1 changed files with 5 additions and 2 deletions
|
@ -89,6 +89,7 @@ namespace Ryujinx.Ava
|
||||||
private float _newVolume;
|
private float _newVolume;
|
||||||
private KeyboardHotkeyState _prevHotkeyState;
|
private KeyboardHotkeyState _prevHotkeyState;
|
||||||
|
|
||||||
|
private Point? _lastCursorPoint;
|
||||||
private long _lastCursorMoveTime;
|
private long _lastCursorMoveTime;
|
||||||
private bool _isCursorInRenderer = true;
|
private bool _isCursorInRenderer = true;
|
||||||
private bool _ignoreCursorState = false;
|
private bool _ignoreCursorState = false;
|
||||||
|
@ -221,12 +222,13 @@ namespace Ryujinx.Ava
|
||||||
|
|
||||||
if (sender is MainWindow window)
|
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();
|
_lastCursorMoveTime = Stopwatch.GetTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
var point = e.GetCurrentPoint(window).Position;
|
|
||||||
var bounds = RendererHost.EmbeddedWindow.Bounds;
|
var bounds = RendererHost.EmbeddedWindow.Bounds;
|
||||||
var windowYOffset = bounds.Y + window.MenuBarHeight;
|
var windowYOffset = bounds.Y + window.MenuBarHeight;
|
||||||
var windowYLimit = (int)window.Bounds.Height - window.StatusBarHeight - 1;
|
var windowYLimit = (int)window.Bounds.Height - window.StatusBarHeight - 1;
|
||||||
|
@ -244,6 +246,7 @@ namespace Ryujinx.Ava
|
||||||
!_viewModel.IsSubMenuOpen;
|
!_viewModel.IsSubMenuOpen;
|
||||||
|
|
||||||
_ignoreCursorState = false;
|
_ignoreCursorState = false;
|
||||||
|
_lastCursorPoint = point;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue