[ros-diffs] [gadamopoulos] 54201: [user32] - 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 p...
gadamopoulos at svn.reactos.org
gadamopoulos at svn.reactos.org
Wed Oct 19 19:22:01 UTC 2011
Author: gadamopoulos
Date: Wed Oct 19 19:21:59 2011
New Revision: 54201
URL: http://svn.reactos.org/svn/reactos?rev=54201&view=rev
Log:
[user32]
- 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
Modified:
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/dll/win32/uxtheme/nonclient.c
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/defwnd.c?rev=54201&r1=54200&r2=54201&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c [iso-8859-1] Wed Oct 19 19:21:59 2011
@@ -1984,7 +1984,15 @@
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 @@
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;
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclient.c?rev=54201&r1=54200&r2=54201&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Wed Oct 19 19:21:59 2011
@@ -1024,6 +1024,8 @@
{
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 @@
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);
}
More information about the Ros-diffs
mailing list