richedit: Prevent EN_UPDATE notifications when window isn't visible.

This commit is contained in:
Dylan Smith 2008-10-19 04:43:07 -04:00 committed by Alexandre Julliard
parent 30ebfa6d74
commit ae3394271d
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -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");