From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/listview.c | 1 + dlls/comctl32/tests/listview.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 13d1bd092f2..5b7bdfac628 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9585,6 +9585,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, WPARAM wParam, const CREATESTRUCTW * infoPtr->iVersion = COMCTL32_VERSION; infoPtr->colRectsDirty = FALSE; infoPtr->selected_column = -1; + infoPtr->hHotCursor = LoadCursorW(NULL, (LPWSTR)IDC_HAND);
/* get default font (icon title) */ SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0); diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 12825ffaa7b..1a9831bbaec 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -7255,6 +7255,19 @@ static void test_LVM_GETNEXTITEM(void) DestroyWindow(hwnd); }
+static void test_LVM_GETHOTCURSOR(void) +{ + HCURSOR cursor; + HWND hwnd; + + hwnd = create_listview_control(LVS_REPORT); + + cursor = (HCURSOR)SendMessageA(hwnd, LVM_GETHOTCURSOR, 0, 0); + ok(!!cursor, "Unexpected cursor %p.\n", cursor); + + DestroyWindow(hwnd); +} + START_TEST(listview) { ULONG_PTR ctx_cookie; @@ -7322,6 +7335,7 @@ START_TEST(listview) test_LVM_SETBKIMAGE(FALSE); test_custom_sort(); test_LVM_GETNEXTITEM(); + test_LVM_GETHOTCURSOR();
if (!load_v6_module(&ctx_cookie, &hCtx)) { @@ -7372,6 +7386,7 @@ START_TEST(listview) test_LVM_GETNEXTITEMINDEX(); test_LVM_GETNEXTITEM(); test_LVM_SETBKIMAGE(TRUE); + test_LVM_GETHOTCURSOR();
unload_v6_module(ctx_cookie, hCtx);
From: Nikolay Sivov nsivov@codeweavers.com
It's worth noting that comctl32 v6 have hottracking notifications enabled by default, there is no need to set any extended styles.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/listview.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 5b7bdfac628..9191aef1c3f 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4150,6 +4150,7 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN /* see if we are supposed to be tracking mouse hovering */ if (LISTVIEW_IsHotTracking(infoPtr)) { TRACKMOUSEEVENT trackinfo; + NMLISTVIEW nmlv = { 0 }; DWORD flags;
trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); @@ -4170,6 +4171,15 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN /* call TRACKMOUSEEVENT so we receive WM_MOUSEHOVER messages */ _TrackMouseEvent(&trackinfo); } + + ht.pt = pt; + LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE); + + nmlv.iItem = ht.iItem; + nmlv.iSubItem = ht.iSubItem; + nmlv.ptAction = pt; + + notify_listview(infoPtr, LVN_HOTTRACK, &nmlv); }
return 0;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149645
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00000000010500E2, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
This merge request was approved by Zhiyi Zhang.