From: Zhiyi Zhang zzhang@codeweavers.com
Fix erwin Data Modeler unable click its comboboxes in listboxes. --- dlls/user32/tests/msg.c | 2 +- dlls/win32u/input.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 83364c32695..9282896262e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -15057,7 +15057,7 @@ static void test_TrackMouseEvent(void) ret = pTrackMouseEvent(&tme); ok(ret, "TrackMouseEvent(TME_LEAVE) failed, error %ld\n", GetLastError()); flush_events(); - ok_sequence(WmMouseLeaveSeq, "WmMouseLeaveSeq", TRUE); + ok_sequence(WmMouseLeaveSeq, "WmMouseLeaveSeq", FALSE);
DestroyWindow(hwnd2); DestroyWindow(hwnd); diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index e403b0f041d..424c4cff9f4 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1813,6 +1813,17 @@ BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info ) } else { + /* If TME_LEAVE is set and when the mouse is not in the tracking window, post WM_MOUSELEAVE + * now and don't overwrite the current tracking information */ + if (info->dwFlags & TME_LEAVE && !hwnd) + { + if (info->dwFlags & TME_NONCLIENT) + NtUserPostMessage( info->hwndTrack, WM_NCMOUSELEAVE, 0, 0 ); + else + NtUserPostMessage( info->hwndTrack, WM_MOUSELEAVE, 0, 0 ); + return TRUE; + } + /* In our implementation, it's possible that another window will receive * WM_MOUSEMOVE and call TrackMouseEvent before TrackMouseEventProc is * called. In such a situation, post the WM_MOUSELEAVE now. */