From 607ef09fa565bde6939f5b3e36b467aaad588658 Mon Sep 17 00:00:00 2001 From: PeterN Date: Wed, 21 Sep 2022 12:08:11 +0100 Subject: [PATCH] Fix: File list mouse hover behaviour. (#10040) Hover highlight was visible even if the mouse pointer was in a different window. Resolved by using OnMouseOver() instead of OnMouseLoop(). --- src/fios_gui.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 3014bc00ec..de351680e3 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -721,11 +721,8 @@ public: } } - void OnMouseLoop() override + void OnMouseOver(Point pt, int widget) override { - const Point pt{ _cursor.pos.x - this->left, _cursor.pos.y - this->top }; - const int widget = GetWidgetFromPos(this, pt.x, pt.y); - if (widget == WID_SL_DRIVES_DIRECTORIES_LIST) { int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP); if (y == INT_MAX) return;