From 8f5df78f2a257a7d70903d56bdca0057b4c989d0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 17 Aug 2014 17:30:25 -0400 Subject: [PATCH] Fixed up hover handling. Thanks to Jonathan Potter on Stack Overflow. --- redo/table_windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redo/table_windows.c b/redo/table_windows.c index 357da25..c0697ef 100644 --- a/redo/table_windows.c +++ b/redo/table_windows.c @@ -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); }