- Patch by Andrew Eikum: Don't try to paint during WM_SETFOCUS if the edit control...
authorJames Tabor <james.tabor@reactos.org>
Sun, 27 Oct 2013 01:23:46 +0000 (01:23 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sun, 27 Oct 2013 01:23:46 +0000 (01:23 +0000)
svn path=/trunk/; revision=60763

reactos/win32ss/user/user32/controls/edit.c

index 0546a9c..30aa88f 100644 (file)
@@ -3840,7 +3840,7 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
             EDIT_InvalidateText(es, es->selection_start, es->selection_end);
 
         /* single line edit updates itself */
             EDIT_InvalidateText(es, es->selection_start, es->selection_end);
 
         /* single line edit updates itself */
-        if (!(es->style & ES_MULTILINE))
+        if (IsWindowVisible(es->hwndSelf) && !(es->style & ES_MULTILINE))
         {
             HDC hdc = GetDC(es->hwndSelf);
             EDIT_WM_Paint(es, hdc);
         {
             HDC hdc = GetDC(es->hwndSelf);
             EDIT_WM_Paint(es, hdc);