Author: jimtabor
Date: Sat Aug 18 23:37:08 2012
New Revision: 57105
URL:
http://svn.reactos.org/svn/reactos?rev=57105&view=rev
Log:
[Win32SS]
- Move WM_SETREDRAW and WM_SYNCPAINT to Win32k.
- Patch by Alex Henrie: Minimize and maximize boxes can only appear when WS_SYSMENU is
set.
Modified:
trunk/reactos/win32ss/user/ntuser/defwnd.c
trunk/reactos/win32ss/user/user32/windows/defwnd.c
Modified: trunk/reactos/win32ss/user/ntuser/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/defwnd…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] Sat Aug 18 23:37:08 2012
@@ -230,6 +230,40 @@
return GetNCHitEx(Wnd, Point);
}
+ case WM_SYNCPAINT:
+ {
+ HRGN hRgn;
+ Wnd->state &= ~WNDS_SYNCPAINTPENDING;
+ ERR("WM_SYNCPAINT\n");
+ hRgn = IntSysCreateRectRgn(0, 0, 0, 0);
+ if (co_UserGetUpdateRgn(Wnd, hRgn, FALSE) != NULLREGION)
+ {
+ if (!wParam) wParam = (RDW_ERASENOW | RDW_ERASE | RDW_FRAME |
RDW_ALLCHILDREN);
+ co_UserRedrawWindow(Wnd, NULL, hRgn, wParam);
+ }
+ GreDeleteObject(hRgn);
+ return 0;
+ }
+
+ case WM_SETREDRAW:
+ if (wParam)
+ {
+ if (!(Wnd->style & WS_VISIBLE))
+ {
+ IntSetStyle( Wnd, WS_VISIBLE, 0 );
+ Wnd->state |= WNDS_SENDNCPAINT;
+ }
+ }
+ else
+ {
+ if (Wnd->style & WS_VISIBLE)
+ {
+ co_UserRedrawWindow( Wnd, NULL, NULL, RDW_ALLCHILDREN | RDW_VALIDATE );
+ IntSetStyle( Wnd, 0, WS_VISIBLE );
+ }
+ }
+ return 0;
+
/* ReactOS only. */
case WM_CBT:
{
@@ -373,8 +407,7 @@
rcWindow.top += UserGetSystemMetrics(SM_CYCAPTION) - 1;
if (!RECTL_bPointInRect( &rcWindow, pt.x, pt.y ))
{
- BOOL min_or_max_box = (Style & WS_MAXIMIZEBOX) ||
- (Style & WS_MINIMIZEBOX);
+ BOOL min_or_max_box = (Style & WS_SYSMENU) && (Style &
(WS_MINIMIZEBOX|WS_MAXIMIZEBOX));
if (ExStyle & WS_EX_LAYOUTRTL)
{
/* Check system menu */
Modified: trunk/reactos/win32ss/user/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] Sat Aug 18 23:37:08
2012
@@ -1245,7 +1245,7 @@
}
return (0);
}
-
+/*
case WM_SYNCPAINT:
{
HRGN hRgn;
@@ -1272,7 +1272,7 @@
}
return (0);
}
-
+*/
case WM_CLOSE:
{
DestroyWindow(hWnd);
@@ -1816,6 +1816,8 @@
/* Move to win32k !*/
case WM_SHOWWINDOW:
if (!lParam) break; // Call when it is necessary.
+ case WM_SYNCPAINT:
+ case WM_SETREDRAW:
case WM_CLIENTSHUTDOWN:
case WM_GETHOTKEY:
case WM_SETHOTKEY: