[WIN32SS:NTUSER] Completely update the metrics in co_IntInitializeDesktopGraphics().
[reactos.git] / win32ss / user / ntuser / painting.c
index 5b4d04f..c1f7cad 100644 (file)
@@ -9,6 +9,9 @@
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserPainting);
 
+BOOL UserExtTextOutW(HDC hdc, INT x, INT y, UINT flags, PRECTL lprc,
+                     LPCWSTR lpString, UINT count);
+
 /* PRIVATE FUNCTIONS **********************************************************/
 
 /**
@@ -366,38 +369,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);
+        }
+    }
 }
 
 /*
@@ -2167,15 +2148,13 @@ UserDrawCaptionText(
 
    if (Ret)
    {  // Faster while in setup.
-      GreExtTextOutW( hDc,
+      UserExtTextOutW( hDc,
                       lpRc->left,
-                      lpRc->top + (lpRc->bottom - lpRc->top) / 2 - Size.cy / 2, // DT_SINGLELINE && DT_VCENTER
+                      lpRc->top + (lpRc->bottom - lpRc->top - Size.cy) / 2, // DT_SINGLELINE && DT_VCENTER
                       ETO_CLIPPED,
                      (RECTL *)lpRc,
                       Text->Buffer,
-                      Length,
-                      NULL,
-                      0 );
+                      Length);
    }
    else
    {