mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 22:52:58 +00:00
- 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. svn path=/trunk/; revision=23428
This commit is contained in:
parent
4546ac2820
commit
db09492d5f
1 changed files with 5 additions and 7 deletions
|
@ -1439,16 +1439,14 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
}
|
}
|
||||||
else if (hWndParent)
|
else if (hWndParent)
|
||||||
{
|
{
|
||||||
if (((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD) ||
|
if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
(dwExStyle & WS_EX_MDICHILD))
|
{ //temp hack
|
||||||
ParentWindowHandle = hWndParent;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//temp hack
|
|
||||||
PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent), Root;
|
PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent), Root;
|
||||||
if (Par && (Root = UserGetAncestor(Par, GA_ROOT)))
|
if (Par && (Root = UserGetAncestor(Par, GA_ROOT)))
|
||||||
OwnerWindowHandle = Root->hSelf;
|
OwnerWindowHandle = Root->hSelf;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
ParentWindowHandle = hWndParent;
|
||||||
}
|
}
|
||||||
else if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
else if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
{
|
{
|
||||||
|
@ -1685,7 +1683,7 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
||||||
Cs.lpCreateParams = lpParam;
|
Cs.lpCreateParams = lpParam;
|
||||||
Cs.hInstance = hInstance;
|
Cs.hInstance = hInstance;
|
||||||
Cs.hMenu = hMenu;
|
Cs.hMenu = hMenu;
|
||||||
Cs.hwndParent = ParentWindowHandle;
|
Cs.hwndParent = hWndParent; //Pass the original Parent handle!
|
||||||
Cs.cx = Size.cx;
|
Cs.cx = Size.cx;
|
||||||
Cs.cy = Size.cy;
|
Cs.cy = Size.cy;
|
||||||
Cs.x = Pos.x;
|
Cs.x = Pos.x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue