[2/2] user32: Ignore lParam argument of WM_SIZE message for edit control.
Sebastian Lackner
sebastian at fds-team.de
Mon Oct 5 16:42:45 CDT 2015
From: Michael Müller <michael at fds-team.de>
Signed-off-by: Michael Müller <michael at fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
For bug https://bugs.winehq.org/show_bug.cgi?id=37542.
dlls/user32/edit.c | 7 +++----
dlls/user32/tests/edit.c | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 084bbff..dfd72e8 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 88bb364..eec1758 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -1486,9 +1486,9 @@ static void test_margins(void)
SendMessageA(hwEdit, WM_SIZE, 0, 0);
SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect);
ok(new_rect.left == old_rect.left, "The left border of the rectangle has changed\n");
- todo_wine ok(new_rect.right == old_rect.right, "The right border of the rectangle has changed\n");
- todo_wine ok(new_rect.top == old_rect.top, "The top border of the rectangle has changed\n");
- todo_wine ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle has changed\n");
+ ok(new_rect.right == old_rect.right, "The right border of the rectangle has changed\n");
+ ok(new_rect.top == old_rect.top, "The top border of the rectangle has changed\n");
+ ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle has changed\n");
DestroyWindow (hwEdit);
--
2.6.0
More information about the wine-patches
mailing list