[WIN32K:NTUSER] Remove the hackish code that has been introduced in IntSendChildNCPai... 674/head
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 8 Jul 2018 00:24:30 +0000 (02:24 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 8 Jul 2018 13:39:50 +0000 (15:39 +0200)
This fixes painting hangs under diverse situations, while CORE-12071 and
CORE-12085 remain fixed.

win32ss/user/ntuser/painting.c

index 5b4d04f..6a8b2a9 100644 (file)
@@ -366,38 +366,16 @@ IntSendNCPaint(PWND pWnd, HRGN hRgn)
 VOID FASTCALL
 IntSendChildNCPaint(PWND pWnd)
 {
-   PWND Child;
-   HWND *List, *phWnd;
-
-   List = IntWinListChildren(UserGetDesktopWindow());
-   if ( List )
-   {
-      for (phWnd = List; *phWnd; ++phWnd)
-      {
-          Child = ValidateHwndNoErr(*phWnd);
-          if ( Child && Child->hrgnUpdate == NULL && Child->state & WNDS_SENDNCPAINT)
-          {
-             USER_REFERENCE_ENTRY Ref;
-             UserRefObjectCo(Child, &Ref);
-             IntSendNCPaint(Child, HRGN_WINDOW);
-             UserDerefObjectCo(Child);
-          }
-      }
-      ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
-   }
-/* FIXME : Use snap shot mode until window death is fixed while surfing menus! Fix CORE-12085 and CORE-12071.
-   pWnd = pWnd->spwndChild;
-   while(pWnd)
-   {
-      if (pWnd->hrgnUpdate == NULL && pWnd->state & WNDS_SENDNCPAINT)
-      {
-         USER_REFERENCE_ENTRY Ref;
-         UserRefObjectCo(pWnd, &Ref);
-         IntSendNCPaint(pWnd, HRGN_WINDOW);
-         UserDerefObjectCo(pWnd);
-      }
-      pWnd = pWnd->spwndNext;
-   }*/
+    for (pWnd = pWnd->spwndChild; pWnd; pWnd = pWnd->spwndNext)
+    {
+        if ((pWnd->hrgnUpdate == NULL) && (pWnd->state & WNDS_SENDNCPAINT))
+        {
+            USER_REFERENCE_ENTRY Ref;
+            UserRefObjectCo(pWnd, &Ref);
+            IntSendNCPaint(pWnd, HRGN_WINDOW);
+            UserDerefObjectCo(pWnd);
+        }
+    }
 }
 
 /*