Author: jimtabor
Date: Sun Sep  6 21:10:46 2015
New Revision: 69072

URL: http://svn.reactos.org/svn/reactos?rev=69072&view=rev
Log:
[Win32k]
- Set flags when it is appropriate, should fix CORE-10101.

Modified:
    trunk/reactos/win32ss/user/ntuser/defwnd.c
    trunk/reactos/win32ss/user/ntuser/nonclient.c

Modified: trunk/reactos/win32ss/user/ntuser/defwnd.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/defwnd.c?rev=69072&r1=69071&r2=69072&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/defwnd.c  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/defwnd.c  [iso-8859-1] Sun Sep  6 
21:10:46 2015
@@ -415,6 +415,7 @@
          * RealUserDrawCaption in order to draw the classic caption when themes
          * are disabled but the themes service is enabled
          */
+         TRACE("UDCB Flags %08x\n");
          co_IntSendMessage(UserHMGetHandle(pWnd), WM_NCUAHDRAWCAPTION, Flags, 
0);
       }
       else
@@ -463,7 +464,7 @@
     IntSetProp(pWnd, gpsi->atomIconSmProp, hIconSmall);
 
     if ((pWnd->style & WS_CAPTION ) == WS_CAPTION)
-       UserPaintCaption(pWnd, DC_CAPTION);
+       UserPaintCaption(pWnd, DC_ICON);
 
     return (LRESULT)hIconOld;
 }

Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/nonclient.c?rev=69072&r1=69071&r2=69072&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/nonclient.c       [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/nonclient.c       [iso-8859-1] Sun Sep  6 
21:10:46 2015
@@ -930,6 +930,8 @@
    {
       TempRect = CurrentRect;
 
+      Flags |= DC_TEXT|DC_BUTTONS; // Icon will be checked if not already set.
+
       if (UserSystemParametersInfo(SPI_GETGRADIENTCAPTIONS, 0, &Gradient, 0) 
&& Gradient)
       {
          Flags |= DC_GRADIENT;
@@ -1039,8 +1041,9 @@
       {
          Active = (gpqForeground == pWnd->head.pti->MessageQueue);
       }
-      Flags = DC_NC;
-   }
+   }
+
+   Flags = DC_NC; // Redraw everything!
 
    IntGetWindowRect(pWnd, &WindowRect);
 
@@ -1112,14 +1115,6 @@
          CurrentRect.top += UserGetSystemMetrics(SM_CYCAPTION);
       }
 
-      if (!(Flags & DC_ICON)               &&
-           (Style & WS_SYSMENU)            &&
-          !(Flags & DC_SMALLCAP)           &&
-          !(ExStyle & WS_EX_DLGMODALFRAME) && 
-          !(ExStyle & WS_EX_TOOLWINDOW) )
-      {
-         pIcon = NC_IconForWindow(pWnd); // Force redraw of caption with icon 
if DC_ICON not flaged....
-      }
       UserDrawCaption(pWnd, hDC, &TempRect, NULL, pIcon ? 
UserHMGetHandle(pIcon) : NULL, NULL, Flags);
 
       /* Draw buttons */
@@ -1409,7 +1404,7 @@
    }
    else
    {
-      Wnd->state &= ~(WNDS_ACTIVEFRAME|WNDS_HASCAPTION);
+      Wnd->state &= ~WNDS_ACTIVEFRAME;
       wParam = DC_CAPTION;
    }
 


Reply via email to