Module: wine Branch: master Commit: d5478118a1fb4c468ddaf7bccd94b70e855ea7dc URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5478118a1fb4c468ddaf7bccd...
Author: Eric Pouech eric.pouech@orange.fr Date: Tue Jan 1 22:05:40 2008 +0100
richedit: Don't force repaint while the redraw flag is off.
---
dlls/riched20/editor.c | 3 ++- dlls/riched20/paint.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 518f86b..bbc5622 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2660,7 +2660,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_SendRequestResize(editor, TRUE); return 0; case WM_SETREDRAW: - editor->bRedraw = wParam; + if ((editor->bRedraw = wParam)) + ME_RewrapRepaint(editor); return 0; case WM_SIZE: { diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 216ef0f..91e283a 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -109,7 +109,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor) { /* Should be called whenever the contents of the control have changed */ ME_Cursor *pCursor; - + + if (!editor->bRedraw) return; if (ME_WrapMarkedParagraphs(editor)) ME_UpdateScrollBar(editor);
@@ -135,10 +136,12 @@ ME_RewrapRepaint(ME_TextEditor *editor) * looks, but not content. Like resizing. */
ME_MarkAllForWrapping(editor); - ME_WrapMarkedParagraphs(editor); - ME_UpdateScrollBar(editor); - - ME_Repaint(editor); + if (editor->bRedraw) + { + ME_WrapMarkedParagraphs(editor); + ME_UpdateScrollBar(editor); + ME_Repaint(editor); + } }
int ME_twips2pointsX(ME_Context *c, int x)