Fixed up hover handling. Thanks to Jonathan Potter on Stack Overflow.
This commit is contained in:
parent
d9b9a9a743
commit
8f5df78f2a
|
@ -14,11 +14,14 @@ static void handleMouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam, void *data)
|
|||
ZeroMemory(&ht, sizeof (LVHITTESTINFO));
|
||||
ht.pt.x = GET_X_LPARAM(lParam);
|
||||
ht.pt.y = GET_Y_LPARAM(lParam);
|
||||
ht.flags = LVHT_ONITEMSTATEICON;
|
||||
if (SendMessageW(hwnd, LVM_SUBITEMHITTEST, 0, (LPARAM) (&ht)) == (LRESULT) -1) {
|
||||
tableSetHot(data, -1, -1);
|
||||
return; // no item
|
||||
}
|
||||
if (ht.flags != LVHT_ONITEMSTATEICON) {
|
||||
tableSetHot(data, -1, -1);
|
||||
return;
|
||||
}
|
||||
tableSetHot(data, ht.iItem, ht.iSubItem);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue