Author: jimtabor
Date: Thu May 10 16:26:02 2012
New Revision: 56560
URL:
http://svn.reactos.org/svn/reactos?rev=56560&view=rev
Log:
[Win32k]
- Patch by Dmitry Timoshkov : SetParent() should use ShowWindow() to make a reparented
window visible and move a window to new position.
- Note: SetWindowPos should be correct,
http://www.winehq.org/pipermail/wine-cvs/2012-April/086267.html
Modified:
trunk/reactos/win32ss/user/ntuser/window.c
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Thu May 10 16:26:02 2012
@@ -1027,6 +1027,7 @@
{
PWND WndOldParent, pWndExam;
BOOL WasVisible;
+ POINT pt;
ASSERT(Wnd);
ASSERT(WndNewParent);
@@ -1065,8 +1066,11 @@
WasVisible = co_WinPosShowWindow(Wnd, SW_HIDE);
/* Window must belong to current process */
- if (Wnd->head.pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
+ if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process())
return NULL;
+
+ pt.x = Wnd->rcWindow.left;
+ pt.y = Wnd->rcWindow.top;
WndOldParent = Wnd->spwndParent;
@@ -1091,14 +1095,10 @@
* in the z-order and send the expected WM_WINDOWPOSCHANGING and
* WM_WINDOWPOSCHANGED notification messages.
*/
- co_WinPosSetWindowPos(Wnd, (0 == (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOP :
HWND_TOPMOST),
- 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE
- | (WasVisible ? SWP_SHOWWINDOW : 0));
-
- /*
- * FIXME: A WM_MOVE is also generated (in the DefWindowProc handler
- * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE.
- */
+ co_WinPosSetWindowPos( Wnd,
+ (0 == (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOP :
HWND_TOPMOST),
+ pt.x, pt.y, 0, 0, SWP_NOSIZE );
+
if (WasVisible) co_WinPosShowWindow(Wnd, SW_SHOWNORMAL);
return WndOldParent;