From: Charlotte Pabst cpabst@codeweavers.com
Prevent GetClientRect from being called when not in-place active. --- dlls/riched20/paint.c | 10 ++++++---- dlls/riched20/tests/txtsrv.c | 1 - 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 54b7ffd82bc..0182e54bfc6 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -110,10 +110,12 @@ void editor_draw( ME_TextEditor *editor, HDC hDC, const RECT *update ) if (oldRgn) DeleteObject( oldRgn ); ME_DestroyContext( &c );
- if (editor->nTotalLength != editor->nLastTotalLength || editor->nTotalWidth != editor->nLastTotalWidth) - ME_SendRequestResize(editor, FALSE); - editor->nLastTotalLength = editor->nTotalLength; - editor->nLastTotalWidth = editor->nTotalWidth; + if (editor->in_place_active) { + if (editor->nTotalLength != editor->nLastTotalLength || editor->nTotalWidth != editor->nLastTotalWidth) + ME_SendRequestResize(editor, FALSE); + editor->nLastTotalLength = editor->nTotalLength; + editor->nLastTotalWidth = editor->nTotalWidth; + } }
void ME_Repaint(ME_TextEditor *editor) diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c index d1770ad532d..0b4ac6c2369 100644 --- a/dlls/riched20/tests/txtsrv.c +++ b/dlls/riched20/tests/txtsrv.c @@ -1446,7 +1446,6 @@ static void test_inplace_active( BOOL active ) CHECK_CALLED(ITextHostImpl_TxGetClientRect); } else { CHECK_NOT_CALLED(ITextHostImpl_TxScrollWindowEx); - todo_wine CHECK_NOT_CALLED(ITextHostImpl_TxGetClientRect); }