Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57178
This makes [7-zip file manager](https://www.7-zip.org/) pressing enter while editing path work: * before: * [Icon near path becomes dark (7-zip file manager doesn't go to path).](https://old.reddit.com/r/winehq/comments/16ah3ze/7zip_cant_enter_path_from_p...) * after: * 7-zip file manager goes to path. * Path input displays incorrect path (shouldn't happen, bug in wine's comboboxex unrelated to toolbar).
-- v4: comctl32/toolbar: forward unhandled WM_NOTIFY
From: Alanas alanas.00@mail.ru
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57178 --- dlls/comctl32/tests/toolbar.c | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 7c886e1f88f..e5cb035bc2f 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -179,7 +179,19 @@ static BOOL equal_dc(HDC hdc1, HDC hdc2, int width, int height)
static void *alloced_str;
-static LRESULT parent_wnd_notify(LPARAM lParam) +#define forward_test_idFrom 0xabcd0002 +#define forward_test_code 0xabcd0003 +#define forward_test_return 0xabcd0004 +static _Bool forward_test; +static const NMHDR forward_test_nmhdr = { + /* .hwndFrom should not be accessed */ + .hwndFrom = (HWND)0xabcd0001, + /* .idFrom and .code don't mean anything */ + .idFrom = forward_test_idFrom, + .code = forward_test_code +}; + +static LRESULT parent_wnd_notify(WPARAM wParam, LPARAM lParam) { NMHDR *hdr = (NMHDR *)lParam; NMTBHOTITEM *nmhi; @@ -371,6 +383,18 @@ static LRESULT parent_wnd_notify(LPARAM lParam)
return 0; } + case forward_test_code: + if (forward_test) + { + ok(hdr == &forward_test_nmhdr, "Got unexpected header.\n"); + ok(wParam == forward_test_idFrom, "Got unexpected wParam 0x%Ix.\n", wParam); + } + else + { + ok(FALSE, "Got unexpected WM_NOTIFY.\n"); + } + forward_test = FALSE; + return forward_test_return; } return 0; } @@ -428,7 +452,7 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, switch (message) { case WM_NOTIFY: - return parent_wnd_notify(lParam); + return parent_wnd_notify(wParam, lParam); }
defwndproc_counter++; @@ -2833,6 +2857,19 @@ static void test_BTNS_SEP(void) DestroyWindow(hwnd); }
+static void test_WM_NOTIFY(void) +{ + HWND toolbar = NULL; + LRESULT ret; + rebuild_toolbar(&toolbar); + forward_test = TRUE; + ret = SendMessageA(toolbar, WM_NOTIFY, 0, (LPARAM)&forward_test_nmhdr); + ok(ret == forward_test_return, "SendMessageA returned 0x%Ix\n", ret); + ok(!forward_test, "toolbar didn't forward WM_NOTIFY to parent\n"); + forward_test = FALSE; + DestroyWindow(toolbar); +} + START_TEST(toolbar) { ULONG_PTR ctx_cookie; @@ -2884,6 +2921,7 @@ START_TEST(toolbar) test_drawtext_flags(); test_imagelist(); test_BTNS_SEP(); + todo_wine test_WM_NOTIFY();
if (!load_v6_module(&ctx_cookie, &ctx)) return;
From: Alanas alanas.00@mail.ru
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57178 --- dlls/comctl32/tests/toolbar.c | 2 +- dlls/comctl32/toolbar.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index e5cb035bc2f..3cd336087f5 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -2921,7 +2921,7 @@ START_TEST(toolbar) test_drawtext_flags(); test_imagelist(); test_BTNS_SEP(); - todo_wine test_WM_NOTIFY(); + test_WM_NOTIFY();
if (!load_v6_module(&ctx_cookie, &ctx)) return; diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 690a02db6ee..d12cd25715c 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -6360,7 +6360,7 @@ TOOLBAR_Notify (TOOLBAR_INFO *infoPtr, LPNMHDR lpnmh) return 0;
default: - return 0; + return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmh->idFrom, (LPARAM)lpnmh); } }
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=149357
Your paranoid android.
=== debian11b (64 bit WoW report) ===
Report validation errors: winmm:mci crashed (c0000008)
On Tue Oct 29 13:47:56 2024 +0000, Zhiyi Zhang wrote:
Yes, when you add test_WM_NOTIFY() before your fix, there will be a test failure on Wine.
I did it: 1. https://gitlab.winehq.org/wine/wine/-/merge_requests/6737/diffs?commit_id=0b... 2. https://gitlab.winehq.org/wine/wine/-/merge_requests/6737/diffs?commit_id=c7...
On Tue Oct 29 14:36:44 2024 +0000, Alanas wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/6737/diffs?diff_id=140548&start_sha=3ced65a8fd4e1e3a3060c74ba4827e71c6b55469#03545023fa1893bb952c1403e2cc9d2e6d261397_192_187)
done
On Tue Oct 29 14:36:45 2024 +0000, Alanas wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/6737/diffs?diff_id=140548&start_sha=3ced65a8fd4e1e3a3060c74ba4827e71c6b55469#03545023fa1893bb952c1403e2cc9d2e6d261397_393_387)
done