Author: jimtabor Date: Thu Aug 3 03:39:53 2006 New Revision: 23428
URL: http://svn.reactos.org/svn/reactos?rev=23428&view=rev Log: - Win32k - CreateWindowsEx: Patch based on janderwald patch. 1. Reading and follow wine source (user/win.c & winex11.drv/window.c), I noticed that cs->hwndParent is unmodified when passed to the children via WM_NC/CREATE. 2. Reordered the "fine the parent" code, based on wine. I've tested this change for last two weeks.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c Thu Aug 3 03:39:53 2006 @@ -1439,16 +1439,14 @@ } else if (hWndParent) { - if (((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD) || - (dwExStyle & WS_EX_MDICHILD)) - ParentWindowHandle = hWndParent; - else - { - //temp hack + if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD) + { //temp hack PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent), Root; if (Par && (Root = UserGetAncestor(Par, GA_ROOT))) OwnerWindowHandle = Root->hSelf; } + else + ParentWindowHandle = hWndParent; } else if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD) { @@ -1685,7 +1683,7 @@ Cs.lpCreateParams = lpParam; Cs.hInstance = hInstance; Cs.hMenu = hMenu; - Cs.hwndParent = ParentWindowHandle; + Cs.hwndParent = hWndParent; //Pass the original Parent handle! Cs.cx = Size.cx; Cs.cy = Size.cy; Cs.x = Pos.x;