[PATCH 0/1] MR1997: Draft: comctl32/header: Do not touch 'hwnd' field in HDM_LAYOUT.
This should wait until after 8.0. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1997
From: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/comctl32/header.c | 1 - dlls/comctl32/listview.c | 2 +- dlls/comctl32/tests/header.c | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 191a314bcd8..1e2d957b93e 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -1465,7 +1465,6 @@ HEADER_InsertItemT (HEADER_INFO *infoPtr, INT nItem, const HDITEMW *phdi, BOOL b static LRESULT HEADER_Layout (HEADER_INFO *infoPtr, LPHDLAYOUT lpLayout) { - lpLayout->pwpos->hwnd = infoPtr->hwndSelf; lpLayout->pwpos->hwndInsertAfter = 0; lpLayout->pwpos->x = lpLayout->prc->left; lpLayout->pwpos->y = lpLayout->prc->top; diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 07bea8574b6..2af109339a6 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -11184,7 +11184,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr) wp.cy = 0; } - SetWindowPos(wp.hwnd, wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags); + SetWindowPos(infoPtr->hwndHeader, wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags); TRACE(" after SWP wp=%d,%d (%dx%d)\n", wp.x, wp.y, wp.cx, wp.cy); infoPtr->rcList.top = max(wp.cy, 0); diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 7261da2a5f3..c027d292385 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -873,9 +873,12 @@ static void test_hdm_layout(HWND hParent) ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, "adder header control to parent", FALSE); + windowPos.hwnd = (HWND)0xdeadbeef; flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessageA(hChild, HDM_LAYOUT, 0, (LPARAM) &hdLayout); expect(TRUE, retVal); + ok(windowPos.hwnd == (HWND)0xdeadbeef, "Unexpected value %p.\n", windowPos.hwnd); + ok(!windowPos.hwndInsertAfter, "Unexpected value %p.\n", windowPos.hwndInsertAfter); ok_sequence(sequences, HEADER_SEQ_INDEX, layout_seq, "layout sequence testing", FALSE); @@ -1884,6 +1887,7 @@ START_TEST(header) test_hdf_fixedwidth(parent_hwnd); test_hds_nosizing(parent_hwnd); test_item_auto_format(parent_hwnd); + test_hdm_layout(parent_hwnd); unload_v6_module(ctx_cookie, hCtx); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1997
participants (2)
-
Nikolay Sivov -
Nikolay Sivov (@nsivov)