Module: wine
Branch: master
Commit: 4f1853c57633629ad81a233ab75a85b6f41399ad
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4f1853c57633629ad81a233a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com>
Date: Wed Feb 23 13:48:23 2022 +0300
comctl32/listview: Initialize subitem text buffer before drawing each subitem.
Notification handler for LVN_GETDISPINFO is not guaranteed to touch text buffer.
When it doesn't, it can lead to already queried text to be reused for subitems.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52583
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/comctl32/listview.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 2cb96367551..730bf4aaddd 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -4800,6 +4800,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
lvItem.lParam = 0;
lvItem.cchTextMax = DISP_TEXT_SIZE;
lvItem.pszText = szDispText;
+ szDispText[0] = 0;
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE;
if (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)
lvItem.state = LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED);
Module: wine
Branch: master
Commit: 9584e0d8e3227a2504d3a3421fb3c4057b121f59
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9584e0d8e3227a2504d3a342…
Author: Rafał Harabień <rafalh92(a)outlook.com>
Date: Fri Feb 18 01:41:40 2022 +0100
user32/tests: Fix invalidation in static control tests.
Rectangle used for invalidation was outside of windows rect of static
controls with SS_ETCHEDHORZ/SS_ETCHEDVERT style because they resize
after creation. Improve test by changing the invalidated rect and
add more details in comment about SS_ETCHEDHORZ/SS_ETCHEDVERT styles.
Signed-off-by: Rafał Harabień <rafalh92(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/user32/tests/static.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c
index f879a803c32..cc5654485bd 100644
--- a/dlls/user32/tests/static.c
+++ b/dlls/user32/tests/static.c
@@ -80,7 +80,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
static void test_updates(int style, int flags)
{
- RECT r1 = {20, 20, 30, 30}, rcClient;
+ RECT r1 = {5, 5, 30, 30}, rcClient;
HWND hStatic = build_static(style);
int exp;
LONG exstyle;
@@ -124,7 +124,7 @@ static void test_updates(int style, int flags)
if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT)
exp = 4;
else
- exp = 1; /* SS_ETCHED* seems to send WM_CTLCOLORSTATIC only sometimes */
+ exp = 2; /* SS_ETCHEDHORZ/SS_ETCHEDVERT have empty client rect so WM_CTLCOLORSTATIC is sent only when parent window is invalidated */
if (flags & TODO_COUNT)
todo_wine { expect_eq(g_nReceivedColorStatic, exp, int, "%d"); }