Alex Henrie : riched20: Don' t call UpdateWindow after setting the background color.
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 07:32:39 CDT 2016
Module: wine
Branch: stable
Commit: b364c0ea92ef4772b5086cd2edbe7cbe7d7b0d25
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b364c0ea92ef4772b5086cd2edbe7cbe7d7b0d25
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Mon May 9 08:57:12 2016 -0600
riched20: Don't call UpdateWindow after setting the background color.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e60b2766987c09dd3ea13adc57df11ee03c05f2a)
Conflicts:
dlls/riched20/tests/editor.c
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/riched20/editor.c | 1 -
dlls/riched20/tests/editor.c | 13 +++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 28c845c..49cfbb8 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3664,7 +3664,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor->hbrBackground = CreateSolidBrush(editor->rgbBackColor);
}
ITextHost_TxInvalidateRect(editor->texthost, NULL, TRUE);
- ITextHost_TxViewChange(editor->texthost, TRUE);
return lColor;
}
case EM_GETMODIFY:
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index efa0b29..7bddfe4 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -8153,6 +8153,18 @@ static void test_alignment_style(void)
DestroyWindow(richedit);
}
+static void test_background(void)
+{
+ HWND hwndRichEdit = new_richedit(NULL);
+
+ /* set the background color to black */
+ ValidateRect(hwndRichEdit, NULL);
+ SendMessageA(hwndRichEdit, EM_SETBKGNDCOLOR, FALSE, RGB(0, 0, 0));
+ ok(GetUpdateRect(hwndRichEdit, NULL, FALSE), "Update rectangle is empty!\n");
+
+ DestroyWindow(hwndRichEdit);
+}
+
START_TEST( editor )
{
BOOL ret;
@@ -8220,6 +8232,7 @@ START_TEST( editor )
test_EM_SETREADONLY();
test_EM_SETFONTSIZE();
test_alignment_style();
+ test_background();
/* Set the environment variable WINETEST_RICHED20 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
More information about the wine-cvs
mailing list