- Set flags when it is appropriate, should fix CORE-10101.

svn path=/trunk/; revision=69072
This commit is contained in:
James Tabor 2015-09-06 21:10:46 +00:00
parent 3e997c870b
commit a85d4e1dc4
2 changed files with 7 additions and 11 deletions

View file

@ -415,6 +415,7 @@ UserPaintCaption(PWND pWnd, INT Flags)
* 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 @@ DefWndSetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
IntSetProp(pWnd, gpsi->atomIconSmProp, hIconSmall);
if ((pWnd->style & WS_CAPTION ) == WS_CAPTION)
UserPaintCaption(pWnd, DC_CAPTION);
UserPaintCaption(pWnd, DC_ICON);
return (LRESULT)hIconOld;
}

View file

@ -930,6 +930,8 @@ VOID UserDrawCaptionBar(
{
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,9 +1041,10 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
{
Active = (gpqForeground == pWnd->head.pti->MessageQueue);
}
Flags = DC_NC;
}
Flags = DC_NC; // Redraw everything!
IntGetWindowRect(pWnd, &WindowRect);
CurrentRect.top = CurrentRect.left = 0;
@ -1112,14 +1115,6 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
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 @@ LRESULT NC_HandleNCActivate( PWND Wnd, WPARAM wParam, LPARAM lParam )
}
else
{
Wnd->state &= ~(WNDS_ACTIVEFRAME|WNDS_HASCAPTION);
Wnd->state &= ~WNDS_ACTIVEFRAME;
wParam = DC_CAPTION;
}