Dylan Smith : richedit: Prevent EN_UPDATE notifications when window isn' t visible.
Alexandre Julliard
julliard at winehq.org
Mon Oct 20 08:00:21 CDT 2008
Module: wine
Branch: master
Commit: ae3394271db2217ec6c92ab3934a6f2b11eb6274
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ae3394271db2217ec6c92ab3934a6f2b11eb6274
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Sun Oct 19 04:43:07 2008 -0400
richedit: Prevent EN_UPDATE notifications when window isn't visible.
---
dlls/riched20/paint.c | 2 ++
dlls/riched20/tests/editor.c | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 2202967..9786af8 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -147,6 +147,8 @@ void ME_Repaint(ME_TextEditor *editor)
ME_UpdateScrollBar(editor);
FIXME("ME_Repaint had to call ME_WrapMarkedParagraphs\n");
}
+ if (!IsWindowVisible(editor->hWnd))
+ return;
if (!editor->bEmulateVersion10 || (editor->nEventMask & ENM_UPDATE))
ME_SendOldNotify(editor, EN_UPDATE);
UpdateWindow(editor->hWnd);
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index b1b7101..c977257 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -5205,7 +5205,7 @@ static void test_eventMask(void)
watchForEventMask = EN_UPDATE;
queriedEventMask = 0; /* initialize to something other than we expect */
SendMessage(eventMaskEditHwnd, EM_REPLACESEL, 0, (LPARAM) text);
- todo_wine ok(queriedEventMask == 0,
+ ok(queriedEventMask == 0,
"wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask);
SetWindowLong(eventMaskEditHwnd, GWL_STYLE, style);
ok(IsWindowVisible(eventMaskEditHwnd), "Window should be visible.\n");
More information about the wine-cvs
mailing list