From 9584e0d8e3227a2504d3a3421fb3c4057b121f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Fri, 18 Feb 2022 01:41:40 +0100 Subject: [PATCH] user32/tests: Fix invalidation in static control tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ń Signed-off-by: Alexandre Julliard --- 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"); }