- When themes are active and the text of a window changes, we should send the WM_NCUAHDRAWCAPTION message instead of drawing the window directly ( which will result painting a classic caption on the themed window)
- Fixes explorer window that is repainted with a classic style when a subfolder is opened

svn path=/trunk/; revision=54201
This commit is contained in:
Giannis Adamopoulos
2011-10-19 19:21:59 +00:00
parent b2ff221e37
commit 14a0a871ad
2 changed files with 21 additions and 6 deletions
+18 -2
View File
@@ -1984,7 +1984,15 @@ RealDefWindowProcA(HWND hWnd,
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, HRGN_WINDOW, -1);
/* FIXME: this is not 100% correct */
if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
{
SendMessage(hWnd, WM_NCUAHDRAWCAPTION,0,0);
}
else
{
DefWndNCPaint(hWnd, HRGN_WINDOW, -1);
}
}
Result = 1;
break;
@@ -2130,7 +2138,15 @@ RealDefWindowProcW(HWND hWnd,
if ((GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_CAPTION) == WS_CAPTION)
{
DefWndNCPaint(hWnd, HRGN_WINDOW, -1);
/* FIXME: this is not 100% correct */
if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
{
SendMessage(hWnd, WM_NCUAHDRAWCAPTION,0,0);
}
else
{
DefWndNCPaint(hWnd, HRGN_WINDOW, -1);
}
}
Result = 1;
break;
+3 -4
View File
@@ -1024,6 +1024,8 @@ ThemeWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndPr
{
case WM_NCPAINT:
return ThemeHandleNCPaint(hWnd, (HRGN)wParam);
case WM_NCUAHDRAWCAPTION:
case WM_NCUAHDRAWFRAME:
case WM_NCACTIVATE:
ThemeHandleNCPaint(hWnd, (HRGN)1);
return TRUE;
@@ -1065,16 +1067,13 @@ ThemeWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndPr
Pt.x = (short)LOWORD(lParam);
Pt.y = (short)HIWORD(lParam);
NC_TrackScrollBar(hWnd, wParam, Pt);
return 0;
}
else
{
return DefWndProc(hWnd, Msg, wParam, lParam);
}
}
case WM_NCUAHDRAWCAPTION:
case WM_NCUAHDRAWFRAME:
/* FIXME: how should these be handled? */
return 0;
default:
return DefWndProc(hWnd, Msg, wParam, lParam);
}