[PATCH] comctl32/tests: Call appropriate default procedure for parent window (Valgrind)

Nikolay Sivov nsivov at codeweavers.com
Tue Jan 10 01:03:13 CST 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

Fixes https://bugs.winehq.org/show_bug.cgi?id=36187

Wrong defproc makes GetWindowTextW() return partially initialized string,
same happens on Windows with this test.

 dlls/comctl32/tests/listview.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 5e69414c32..6d21b05436 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -555,7 +555,10 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
     }
 
     defwndproc_counter++;
-    ret = DefWindowProcA(hwnd, message, wParam, lParam);
+    if (IsWindowUnicode(hwnd))
+        ret = DefWindowProcW(hwnd, message, wParam, lParam);
+    else
+        ret = DefWindowProcA(hwnd, message, wParam, lParam);
     defwndproc_counter--;
 
     return ret;
-- 
2.11.0




More information about the wine-patches mailing list