Jacek Caban : user32: Always use 64-bit cbWndExtra for edit control.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 15:17:51 CDT 2022
Module: wine
Branch: master
Commit: 30209d86b0a585b8a6d6b51c5afbf0653055d62c
URL: https://gitlab.winehq.org/wine/wine/-/commit/30209d86b0a585b8a6d6b51c5afbf0653055d62c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Aug 8 13:42:09 2022 +0200
user32: Always use 64-bit cbWndExtra for edit control.
---
dlls/user32/edit.c | 6 +-----
dlls/user32/tests/class.c | 10 +++-------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 81296f7deeb..3bbcd9ab746 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -5265,11 +5265,7 @@ const struct builtin_class_descr EDIT_builtin_class =
L"Edit", /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */
WINPROC_EDIT, /* proc */
-#ifdef __i386__
- sizeof(EDITSTATE *) + sizeof(WORD), /* extra */
-#else
- sizeof(EDITSTATE *), /* extra */
-#endif
+ sizeof(UINT64), /* extra */
IDC_IBEAM, /* cursor */
0 /* brush */
};
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c
index 795c65b7c48..686fced55ee 100644
--- a/dlls/user32/tests/class.c
+++ b/dlls/user32/tests/class.c
@@ -957,15 +957,11 @@ static const struct
{
const char name[9];
int value;
- int badvalue;
+ int value64; /* 64-bit Windows use 64-bit size also for 32-bit applications */
} extra_values[] =
{
{"#32770",30,30}, /* Dialog */
-#ifdef _WIN64
- {"Edit",8,8},
-#else
- {"Edit",6,8}, /* Windows XP 64-bit returns 8 also to 32-bit applications */
-#endif
+ {"Edit",6,8},
};
static void test_extra_values(void)
@@ -978,7 +974,7 @@ static void test_extra_values(void)
ok( ret, "GetClassInfo (0) failed for global class %s\n", extra_values[i].name);
if (!ret) continue;
- ok(extra_values[i].value == wcx.cbWndExtra || broken(extra_values[i].badvalue == wcx.cbWndExtra),
+ ok(extra_values[i].value == wcx.cbWndExtra || extra_values[i].value64 == wcx.cbWndExtra,
"expected %d, got %d\n", extra_values[i].value, wcx.cbWndExtra);
}
}
More information about the wine-cvs
mailing list