From 2be56fdc95584e1902670481e3b12cb6b4a9eb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 6 Oct 2015 03:32:21 +0200 Subject: [PATCH] user32: Ignore lParam argument of WM_SIZE message for edit control. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Müller Signed-off-by: Sebastian Lackner --- dlls/user32/edit.c | 7 +++---- dlls/user32/tests/edit.c | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 084bbffd8fe..dfd72e87e0f 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -3923,12 +3923,11 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode) * WM_SIZE * */ -static void EDIT_WM_Size(EDITSTATE *es, UINT action, INT width, INT height) +static void EDIT_WM_Size(EDITSTATE *es, UINT action) { if ((action == SIZE_MAXIMIZED) || (action == SIZE_RESTORED)) { RECT rc; - TRACE("width = %d, height = %d\n", width, height); - SetRect(&rc, 0, 0, width, height); + GetClientRect(es->hwndSelf, &rc); EDIT_SetRectNP(es, &rc); EDIT_UpdateText(es, NULL, TRUE); } @@ -5096,7 +5095,7 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B break; case WM_SIZE: - EDIT_WM_Size(es, (UINT)wParam, LOWORD(lParam), HIWORD(lParam)); + EDIT_WM_Size(es, (UINT)wParam); break; case WM_STYLECHANGED: diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index bd7b6d59a0a..6ff72251d77 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1483,16 +1483,16 @@ static void test_margins(void) SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&old_rect); SendMessageA(hwEdit, WM_SIZE, SIZE_RESTORED, 0); SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - todo_wine ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); + ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); SendMessageA(hwEdit, WM_SIZE, SIZE_MINIMIZED, 0); SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - todo_wine ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); + ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); SendMessageA(hwEdit, WM_SIZE, SIZE_MAXIMIZED, 0); SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - todo_wine ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); + ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); SendMessageA(hwEdit, WM_SIZE, SIZE_RESTORED, MAKELONG(10, 10)); SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - todo_wine ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); + ok(EqualRect(&old_rect, &new_rect), "The border of the rectangle has changed\n"); DestroyWindow (hwEdit);