1
0
Fork 0

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().
pull/10042/head
PeterN 2022-09-21 12:08:11 +01:00 committed by GitHub
parent 548f0496a9
commit 607ef09fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -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) { if (widget == WID_SL_DRIVES_DIRECTORIES_LIST) {
int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP); int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP);
if (y == INT_MAX) return; if (y == INT_MAX) return;