From b0aa3a0d5bd3f452e50bb34a19e29f4b4d9c014e Mon Sep 17 00:00:00 2001 From: Felipe Gomes Date: Tue, 26 Oct 2010 15:50:29 -0200 Subject: [PATCH] Bug 600986. Persona background is seen above titlebar (classic windows theme). r=jimm a=final --- widget/src/windows/nsNativeThemeWin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/widget/src/windows/nsNativeThemeWin.cpp b/widget/src/windows/nsNativeThemeWin.cpp index 578e2fd53c92..fd7ffbceda36 100644 --- a/widget/src/windows/nsNativeThemeWin.cpp +++ b/widget/src/windows/nsNativeThemeWin.cpp @@ -3288,14 +3288,17 @@ RENDER_AGAIN: case NS_THEME_WINDOW_TITLEBAR: case NS_THEME_WINDOW_TITLEBAR_MAXIMIZED: { - // inset the caption area so it doesn't overflow. RECT rect = widgetRect; PRInt32 offset = GetSystemMetrics(SM_CXFRAME); + rect.bottom -= 1; + + // first fill the area to the color of the window background + FillRect(hdc, &rect, (HBRUSH)(COLOR_3DFACE+1)); + + // inset the caption area so it doesn't overflow. rect.top += offset; rect.left += offset; rect.right -= offset; - rect.bottom -= 1; - // if enabled, draw a gradient titlebar background, otherwise // fill with a solid color. BOOL bFlag = TRUE;