From 95e31a1d3f75f3d4f5430f97690630222aef89c3 Mon Sep 17 00:00:00 2001 From: stax76 Date: Fri, 19 Aug 2022 06:53:49 +0200 Subject: [PATCH] Improved mouse cursor hide behavior --- docs/Changelog.md | 1 + src/WinForms/MainForm.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index bc5eb78..e86f063 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,6 +6,7 @@ - New history-filter option added to define paths to be excluded from the history log feature. - New command to move the Window to the screen edge (Alt+Arrow) or center (Alt+BS). - Smaller OSD media info font size and more duplicated and obvious info removed from titles. +- Improved mouse cursor hide behavior. - libmpv shinchiro 2022-08-11 input.conf changes: diff --git a/src/WinForms/MainForm.cs b/src/WinForms/MainForm.cs index 7d68171..144bef9 100644 --- a/src/WinForms/MainForm.cs +++ b/src/WinForms/MainForm.cs @@ -1059,8 +1059,9 @@ namespace mpvnet LastCursorPosition = MousePosition; LastCursorChanged = Environment.TickCount; } - else if (Environment.TickCount - LastCursorChanged > 1500 && - !IsMouseInOSC() && ClientRectangle.Contains(PointToClient(MousePosition)) && + else if (((Environment.TickCount - LastCursorChanged > 1500 && + !IsMouseInOSC()) || Environment.TickCount - LastCursorChanged > 5000) && + ClientRectangle.Contains(PointToClient(MousePosition)) && ActiveForm == this && !ContextMenu.IsVisible && !IsCommandPaletteVissible()) CursorHelp.Hide();