// Only the windows that overlap will be redrawn.
if (RECTL_bIntersectRect( &rect, &pwnd->rcWindow, &pwndTemp->rcWindow ))
{
- co_UserRedrawWindow( pwndTemp, NULL, NULL, RDW_UPDATENOW | RDW_ALLCHILDREN);
+ co_UserRedrawWindow( pwndTemp, NULL, NULL, RDW_UPDATENOW | RDW_NOCHILDREN);
}
}
}
if (!(Flags & DC_NOVISIBLE) && !IntIsWindowVisible(pWnd)) return;
- TRACE("UserDrawCaptionBar: pWnd %p, hDc %p, Flags 0x%x.\n", pWnd, hDC, Flags);
+ ERR("UserDrawCaptionBar: pWnd %p, hDc %p, Flags 0x%x.\n", pWnd, hDC, Flags);
Style = pWnd->style;
ExStyle = pWnd->ExStyle;
{
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;
{
Active = (gpqForeground == pWnd->head.pti->MessageQueue);
}
- Flags = DC_NC;
+ Flags = DC_NC; // Redraw everything!
}
+ else
+ Flags |= DC_NC;
+
IntGetWindowRect(pWnd, &WindowRect);
if (Active)
{
- if (!(pWnd->state & WNDS_ACTIVEFRAME))
+ if (pWnd->state & WNDS_ACTIVEFRAME)
+ Flags |= DC_ACTIVE;
+ else
{
ERR("Wnd is active and not set active!\n");
}
- Flags |= DC_ACTIVE;
}
TempRect = CurrentRect;
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 */
}
else
{
- Wnd->state &= ~(WNDS_ACTIVEFRAME|WNDS_HASCAPTION);
+ Wnd->state &= ~WNDS_ACTIVEFRAME;
wParam = DC_CAPTION;
}
for (;;)
{
- if (co_IntGetPeekMessage(&Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE, TRUE) <= 0)
- break;
+ if (!co_IntGetPeekMessage(&Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE, TRUE)) break;
if (IntCallMsgFilter( &Msg, MSGF_MAX )) continue;
if (Msg.message == WM_LBUTTONUP)