Author: jimtabor
Date: Wed Apr 9 20:50:03 2014
New Revision: 62696
URL:
http://svn.reactos.org/svn/reactos?rev=62696&view=rev
Log:
[NtUser|User32]
- Sync port (more) from wine to update code before move and test. See CORE-7447.
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] Wed Apr 9 20:50:03 2014
@@ -169,19 +169,19 @@
IntGetClientRect(pWnd, &Rect);
IntMapWindowPoints(pWnd, (style & WS_CHILD ? IntGetParent(pWnd) : NULL), (LPPOINT)
&Rect, 2);
- if (! (Pos->flags & SWP_NOCLIENTMOVE))
+ if (!(Pos->flags & SWP_NOCLIENTMOVE))
{
co_IntSendMessage(UserHMGetHandle(pWnd), WM_MOVE, 0, MAKELONG(Rect.left,
Rect.top));
}
- if (! (Pos->flags & SWP_NOCLIENTSIZE))
+ if (!(Pos->flags & SWP_NOCLIENTSIZE) || (Pos->flags & SWP_STATECHANGED))
{
- WPARAM wp = SIZE_RESTORED;
-
- if (style & WS_MAXIMIZE) wp = SIZE_MAXIMIZED;
- else if (style & WS_MINIMIZE) wp = SIZE_MINIMIZED;
-
- co_IntSendMessage(UserHMGetHandle(pWnd), WM_SIZE, wp, MAKELONG(Rect.right -
Rect.left, Rect.bottom - Rect.top));
+ if (style & WS_MINIMIZE) co_IntSendMessage(UserHMGetHandle(pWnd), WM_SIZE,
SIZE_MINIMIZED, 0 );
+ else
+ {
+ WPARAM wp = (style & WS_MAXIMIZE) ? SIZE_MAXIMIZED : SIZE_RESTORED;
+ co_IntSendMessage(UserHMGetHandle(pWnd), WM_SIZE, wp, MAKELONG(Rect.right -
Rect.left, Rect.bottom - Rect.top));
+ }
}
return 0;
}
@@ -200,6 +200,15 @@
NtGdiSelectBrush( hdc, hbrush );
}
+VOID FASTCALL
+UserDrawMovingFrame(HDC hdc,
+ RECTL *rect,
+ BOOL thickframe)
+{
+ if (thickframe) UserDrawWindowFrame(hdc, rect, UserGetSystemMetrics(SM_CXFRAME),
UserGetSystemMetrics(SM_CYFRAME));
+ else UserDrawWindowFrame(hdc, rect, 1, 1);
+}
+
LRESULT FASTCALL
DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
{
@@ -216,6 +225,12 @@
switch (wParam & 0xfff0)
{
+ case SC_MOVE:
+ case SC_SIZE:
+ //DefWndDoSizeMove(pWnd, wParam);
+ ERR("SC_MOVESIZE\n");
+ break;
+
case SC_SCREENSAVE:
ERR("Screensaver Called!\n");
UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always
lParam 0 == not Secure
@@ -302,8 +317,10 @@
return (LRESULT) DefWndControlColor((HDC)wParam, HIWORD(lParam));
case WM_GETHOTKEY:
+ //ERR("WM_GETHOTKEY\n");
return DefWndGetHotKey(Wnd);
case WM_SETHOTKEY:
+ //ERR("WM_SETHOTKEY\n");
return DefWndSetHotKey(Wnd, wParam);
case WM_NCHITTEST:
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] Wed Apr 9 20:50:03
2014
@@ -153,7 +153,7 @@
}
}
-#if 0 // Moved to Win32k
+#if 0
VOID
DefWndSetRedraw(HWND hWnd, WPARAM wParam)
{
@@ -344,6 +344,7 @@
}
SetCursorPos( pt.x, pt.y );
DefWndHandleSetCursor(hWnd, (WPARAM)hWnd, MAKELONG(hittest, WM_MOUSEMOVE), Style);
+ //SendMessageW(hWnd, WM_SETCURSOR, (WPARAM)hWnd, MAKELONG(hittest, WM_MOUSEMOVE));
return hittest;
}
@@ -419,7 +420,7 @@
//
// Show window contents while dragging the window, get flag from registry data.
//
- SystemParametersInfoA(SPI_GETDRAGFULLWINDOWS, 0, &DragFullWindows, 0);
+ SystemParametersInfoW(SPI_GETDRAGFULLWINDOWS, 0, &DragFullWindows, 0);
pt.x = GET_X_LPARAM(dwPoint);
pt.y = GET_Y_LPARAM(dwPoint);
@@ -450,11 +451,11 @@
SetCapture(hwnd);
hittest = DefWndStartSizeMove(hwnd, Wnd, wParam, &capturePoint);
if (!hittest)
- {
+ {
ReleaseCapture();
return;
- }
- }
+ }
+ }
}
/* Get min/max info */
@@ -515,7 +516,7 @@
}
IntNotifyWinEvent( EVENT_SYSTEM_MOVESIZESTART, hwnd, OBJID_WINDOW, CHILDID_SELF, 0);
- SendMessageA( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
+ SendMessageW( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
NtUserxSetGUIThreadHandle(MSQ_STATE_MOVESIZE, hwnd);
if (GetCapture() != hwnd) SetCapture( hwnd );
@@ -703,8 +704,8 @@
}
NtUserxSetGUIThreadHandle(MSQ_STATE_MOVESIZE, NULL);
- SendMessageA( hwnd, WM_EXITSIZEMOVE, 0, 0 );
- SendMessageA( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
+ SendMessageW( hwnd, WM_EXITSIZEMOVE, 0, 0 );
+ SendMessageW( hwnd, WM_SETVISIBLE, !IsIconic(hwnd), 0L);
/* window moved or resized */
if (moved)
@@ -744,7 +745,7 @@
if( !moved )
{
if( Style & WS_SYSMENU )
- SendMessageA( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU,
MAKELONG(pt.x,pt.y));
+ SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU,
MAKELONG(pt.x,pt.y));
}
}
}